Type definitions and tests for constant-case

This commit is contained in:
Sam Saint-Pettersen committed 2015-07-21 02:10:25 +01:00
1 parent 3ac0cbdf5d
commit ae10100972
2 files changed
+18

No files matched your search

+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;
}