From 563cc35a17808ace7d527f1af829e74a2431290b Mon Sep 17 00:00:00 2001 From: Sam Saint-Pettersen Date: Thu, 16 Jul 2015 22:25:10 +0100 Subject: [PATCH] Type definitions and tests for node title-case module --- title-case/title-case-tests.ts | 7 +++++++ title-case/title-case.d.ts | 9 +++++++++ 2 files changed, 16 insertions(+) create mode 100644 title-case/title-case-tests.ts create mode 100644 title-case/title-case.d.ts diff --git a/title-case/title-case-tests.ts b/title-case/title-case-tests.ts new file mode 100644 index 0000000000..d1183db8f1 --- /dev/null +++ b/title-case/title-case-tests.ts @@ -0,0 +1,7 @@ +/// + +import titleCase = require('title-case'); + +console.log(titleCase('string')); // => "String" +console.log(titleCase('PascalCase')); // => "Pascal Case" +console.log(titleCase('STRING', 'tr')); // => "Strıng" diff --git a/title-case/title-case.d.ts b/title-case/title-case.d.ts new file mode 100644 index 0000000000..c8e4dee309 --- /dev/null +++ b/title-case/title-case.d.ts @@ -0,0 +1,9 @@ +// Type definitions for title-case +// Project: https://github.com/blakeembrey/title-case +// Definitions by: Sam Saint-Pettersen +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module "title-case" { + function titleCase(string1: string, string2?: string): string; + export = titleCase; +} \ No newline at end of file