This commit is contained in:
Sam Saint-Pettersen
2015-07-17 12:04:53 +01:00
parent 563cc35a17
commit e34f20e4f1
2 changed files with 18 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
/// <reference path="../node/node.d.ts" />
/// <reference path="to-title-case.d.ts" />
import fs = require('fs');
fs.readFile('to-title-case.min.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.
});
+8
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;
}