Type definitions and tests for node title-case module

This commit is contained in:
Sam Saint-Pettersen
2015-07-16 22:25:10 +01:00
parent f1e3435581
commit 563cc35a17
2 changed files with 16 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
/// <reference path="title-case.d.ts" />
import titleCase = require('title-case');
console.log(titleCase('string')); // => "String"
console.log(titleCase('PascalCase')); // => "Pascal Case"
console.log(titleCase('STRING', 'tr')); // => "Strıng"
+9
View File
@@ -0,0 +1,9 @@
// Type definitions for title-case
// Project: https://github.com/blakeembrey/title-case
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "title-case" {
function titleCase(string1: string, string2?: string): string;
export = titleCase;
}