Merge pull request #5278 from stpettersens/master

Type definitions and tests for swap-case
This commit is contained in:
Horiuchi_H
2015-08-12 12:42:15 +09:00
2 changed files with 19 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
/// <reference path="swap-case.d.ts" />
import swapCase = require('swap-case');
console.log(swapCase(null)); // => ""
console.log(swapCase('string')); // => "STRING"
console.log(swapCase('PascalCase')); // => "pASCALcASE"
console.log(swapCase('Iñtërnâtiônàlizætiøn')); //=> "iÑTËRNÂTIÔNÀLIZÆTIØN"
console.log(swapCase('My String', 'tr')); // => "mY sTRİNG"
+9
View File
@@ -0,0 +1,9 @@
// Type definitions for swap-case
// Project: https://github.com/blakeembrey/swap-case
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "swap-case" {
function swapCase(string: string, locale?: string): string;
export = swapCase;
}