mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 13:00:19 +00:00
Merge pull request #5278 from stpettersens/master
Type definitions and tests for swap-case
This commit is contained in:
@@ -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"
|
||||
Vendored
+9
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user