Merge pull request #4975 from stpettersens/master

Type definitions and tests for to-title-case-gouch
This commit is contained in:
Masahiro Wakame
2015-07-19 22:54:29 +09:00
2 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
/// <reference path="../node/node.d.ts" />
/// <reference path="to-title-case-gouch.d.ts" />
import fs = require('fs');
fs.readFile('to-title-case.js', 'utf-8', function(err: any, code: string) {
eval(code);
var lowerCase: string = 'this title is in lowercase and will be title case';
console.log(lowerCase.toTitleCase()); // Now in title case.
});

View File

@@ -0,0 +1,8 @@
// Type definitions for to-title-case
// Project: https://github.com/gouch/to-title-case
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface String {
toTitleCase(): string;
}