From a4936421e66c55140afd6a1bf77038e665bd4980 Mon Sep 17 00:00:00 2001 From: Sam Saint-Pettersen Date: Tue, 21 Jul 2015 11:06:28 +0100 Subject: [PATCH] Type definitions and tests for dot-case --- dot-case/dot-case-tests.ts | 9 +++++++++ dot-case/dot-case.d.ts | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100644 dot-case/dot-case-tests.ts create mode 100644 dot-case/dot-case.d.ts diff --git a/dot-case/dot-case-tests.ts b/dot-case/dot-case-tests.ts new file mode 100644 index 0000000000..d5713aeba8 --- /dev/null +++ b/dot-case/dot-case-tests.ts @@ -0,0 +1,9 @@ +/// + +import dotCase = require('dot-case'); + +console.log(dotCase('string')); // => "string" +console.log(dotCase('camelCase')); // => "camel.case" +console.log(dotCase('sentence case')); // => "sentence.case" + +console.log(dotCase('MY STRING', 'tr')); // => "my.strıng" diff --git a/dot-case/dot-case.d.ts b/dot-case/dot-case.d.ts new file mode 100644 index 0000000000..5e02a23421 --- /dev/null +++ b/dot-case/dot-case.d.ts @@ -0,0 +1,9 @@ +// Type definitions for dot-case +// Project: https://github.com/blakeembrey/dot-case +// Definitions by: Sam Saint-Pettersen +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module "dot-case" { + function dotCase(string: string, locale?: string): string; + export = dotCase; +}