Type definitions and tests for dot-case

This commit is contained in:
Sam Saint-Pettersen 2015-07-21 11:06:28 +01:00
parent ae10100972
commit a4936421e6
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,9 @@
/// <reference path="dot-case.d.ts" />
import dotCase = require('dot-case');
console.log(dotCase('string')); // => "string"
console.log(dotCase('camelCase')); // => "camel.case"
console.log(dotCase('sentence case')); // => "sentence.case"
console.log(dotCase('MY STRING', 'tr')); // => "my.strıng"

9
dot-case/dot-case.d.ts vendored Normal file
View File

@ -0,0 +1,9 @@
// Type definitions for dot-case
// Project: https://github.com/blakeembrey/dot-case
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "dot-case" {
function dotCase(string: string, locale?: string): string;
export = dotCase;
}