From ae10100972cbb6cbac610672c269c2d5c1e18e4b Mon Sep 17 00:00:00 2001 From: Sam Saint-Pettersen Date: Tue, 21 Jul 2015 02:10:25 +0100 Subject: [PATCH] Type definitions and tests for constant-case --- constant-case/constant-case-tests.ts | 9 +++++++++ constant-case/constant-case.d.ts | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100644 constant-case/constant-case-tests.ts create mode 100644 constant-case/constant-case.d.ts diff --git a/constant-case/constant-case-tests.ts b/constant-case/constant-case-tests.ts new file mode 100644 index 000000000..b7ac3fe9e --- /dev/null +++ b/constant-case/constant-case-tests.ts @@ -0,0 +1,9 @@ +/// + +import constantCase = require('constant-case'); + +console.log(constantCase('string')); // => "STRING" +console.log(constantCase('PascalCase')); // => "PASCAL_CASE" + +console.log(constantCase('myString', 'tr')); // => "MY_STRİNG" + diff --git a/constant-case/constant-case.d.ts b/constant-case/constant-case.d.ts new file mode 100644 index 000000000..dfc14ed77 --- /dev/null +++ b/constant-case/constant-case.d.ts @@ -0,0 +1,9 @@ +// Type definitions for constant-case +// Project: https://github.com/blakeembrey/constant-case +// Definitions by: Sam Saint-Pettersen +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module "constant-case" { + function constantCase(string: string, locale?: string): string; + export = constantCase; +}