Skip to content

Commit 5aef283

Browse files
committed
Type definitions and tests fro camel-case
1 parent a99412d commit 5aef283

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

camel-case/camel-case-tests.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/// <reference path="camel-case.d.ts" />
2+
3+
import camelCase = require('camel-case');
4+
5+
console.log(camelCase('string')); // => "string"
6+
console.log(camelCase('dot.case')); // => "dotCase"
7+
console.log(camelCase('PascalCase')); // => "pascalCase"
8+
console.log(camelCase('version 1.2.10')); // => "version1_2_10"
9+
10+
console.log(camelCase('STRING 1.2', 'tr')); // => "strıng1_2"

camel-case/camel-case.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Type definitions for camel-case
2+
// Project: https://github.com/blakeembrey/camel-case
3+
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
4+
// Definitions: https://github.com/borisyankov/DefinitelyTyped
5+
6+
declare module "camel-case" {
7+
function camelCase(string: string, locale?: string): string;
8+
export = camelCase;
9+
}

0 commit comments

Comments
 (0)