Add dashify (#23092)

* Add dashify

* Use 4 spaces
This commit is contained in:
Junyoung Choi (Sai)
2018-01-23 10:28:25 -08:00
committed by Andy
parent 09f0e72b83
commit 861b87f6ba
4 changed files with 47 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
import dashify = require('dashify');
const output: string = dashify('Foo----Bar');
// => 'foo----bar'
const output2: string = dashify('Foo----Bar', {condense: true});
// => 'foo-bar'
+14
View File
@@ -0,0 +1,14 @@
// Type definitions for dashify 1.0
// Project: https://github.com/jonschlinkert/dashify
// Definitions by: Junyoung Choi <https://github.com/rokt33r>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function dashify(input: string, options?: dashify.Options): string;
declare namespace dashify {
interface Options {
condense?: boolean;
}
}
export = dashify;
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"dashify-tests.ts"
]
}
+3
View File
@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}