Skip to content

Commit 563cc35

Browse files
committed
Type definitions and tests for node title-case module
1 parent f1e3435 commit 563cc35

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

title-case/title-case-tests.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/// <reference path="title-case.d.ts" />
2+
3+
import titleCase = require('title-case');
4+
5+
console.log(titleCase('string')); // => "String"
6+
console.log(titleCase('PascalCase')); // => "Pascal Case"
7+
console.log(titleCase('STRING', 'tr')); // => "Strıng"

title-case/title-case.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Type definitions for title-case
2+
// Project: https://github.com/blakeembrey/title-case
3+
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
4+
// Definitions: https://github.com/borisyankov/DefinitelyTyped
5+
6+
declare module "title-case" {
7+
function titleCase(string1: string, string2?: string): string;
8+
export = titleCase;
9+
}

0 commit comments

Comments
 (0)