Type definitions and tests for constant-case

This commit is contained in:
Sam Saint-Pettersen
2015-07-21 02:10:25 +01:00
parent 3ac0cbdf5d
commit ae10100972
2 changed files with 18 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
/// <reference path="constant-case.d.ts" />
import constantCase = require('constant-case');
console.log(constantCase('string')); // => "STRING"
console.log(constantCase('PascalCase')); // => "PASCAL_CASE"
console.log(constantCase('myString', 'tr')); // => "MY_STRİNG"
+9
View File
@@ -0,0 +1,9 @@
// Type definitions for constant-case
// Project: https://github.com/blakeembrey/constant-case
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "constant-case" {
function constantCase(string: string, locale?: string): string;
export = constantCase;
}