mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 13:00:19 +00:00
Merge pull request #17426 from plantain-00/uppercamelcase
add types for uppercamelcase
This commit is contained in:
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// Type definitions for uppercamelcase
|
||||
// Project: https://github.com/samverschueren/uppercamelcase
|
||||
// Definitions by: York Yao <https://github.com/plantain-00>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare function upperCamelCase(...args: string[]): string;
|
||||
export = upperCamelCase;
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"uppercamelcase-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import upperCamelCase = require('uppercamelcase');
|
||||
|
||||
upperCamelCase('foo-bar');
|
||||
//=> FooBar
|
||||
|
||||
upperCamelCase('foo_bar');
|
||||
//=> FooBar
|
||||
|
||||
upperCamelCase('Foo-Bar');
|
||||
//=> FooBar
|
||||
|
||||
upperCamelCase('--foo.bar');
|
||||
//=> FooBar
|
||||
|
||||
upperCamelCase('__foo__bar__');
|
||||
//=> FooBar
|
||||
|
||||
upperCamelCase('foo bar');
|
||||
//=> FooBar
|
||||
|
||||
upperCamelCase("--foo-bar");
|
||||
//=> FooBar
|
||||
|
||||
upperCamelCase('foo', 'bar');
|
||||
//=> 'FooBar'
|
||||
|
||||
upperCamelCase('__foo__', '--bar');
|
||||
//=> 'FooBar'
|
||||
Reference in New Issue
Block a user