mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-03 16:50:15 +00:00
Merge pull request #5215 from stpettersens/master
Type definitions and tests for sentence-case
This commit is contained in:
13
sentence-case/sentence-case-tests.ts
Normal file
13
sentence-case/sentence-case-tests.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
/// <reference path="sentence-case.d.ts" />
|
||||
|
||||
import sentenceCase = require('sentence-case');
|
||||
|
||||
console.log(sentenceCase(null)); // => ""
|
||||
console.log(sentenceCase('string')); // => "stringe"
|
||||
console.log(sentenceCase('dot.case')); // => "dot case"
|
||||
console.log(sentenceCase('camelCase')); // => "camel case"
|
||||
console.log(sentenceCase('Beyoncé Knowles')); // => "beyoncé knowles"
|
||||
|
||||
console.log(sentenceCase('A STRING', 'tr')); // => "a strıng"
|
||||
|
||||
console.log(sentenceCase('HELLO WORLD!', null, '_')); // => "hello_world"
|
||||
9
sentence-case/sentence-case.d.ts
vendored
Normal file
9
sentence-case/sentence-case.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
// Type definitions for sentence-case
|
||||
// Project: https://github.com/blakeembrey/sentence-case
|
||||
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "sentence-case" {
|
||||
function sentenceCase(string: string, locale?: string, repl?: string): string;
|
||||
export = sentenceCase;
|
||||
}
|
||||
Reference in New Issue
Block a user