mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 07:40:10 +00:00
Merge pull request #4975 from stpettersens/master
Type definitions and tests for to-title-case-gouch
This commit is contained in:
10
to-title-case-gouch/to-title-case-gouch-tests.ts
Normal file
10
to-title-case-gouch/to-title-case-gouch-tests.ts
Normal 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.
|
||||
});
|
||||
8
to-title-case-gouch/to-title-case-gouch.d.ts
vendored
Normal file
8
to-title-case-gouch/to-title-case-gouch.d.ts
vendored
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user