mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-30 11:14:27 +08:00
Merge pull request #5227 from stpettersens/master
Type definitions and tests for snake-case
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
/// <reference path="snake-case.d.ts" />
|
||||
|
||||
import camelCase = require('snake-case');
|
||||
|
||||
console.log(camelCase('string')); // => "string"
|
||||
console.log(camelCase('camelCase')); // => "camel_case"
|
||||
console.log(camelCase('sentence case')); // => "sentence_case"
|
||||
|
||||
console.log(camelCase('MY STRING', 'tr')); // => "my_strıng"
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// Type definitions for snake-case
|
||||
// Project: https://github.com/blakeembrey/snake-case
|
||||
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "snake-case" {
|
||||
function snakeCase(string: string, locale?: string): string;
|
||||
export = snakeCase;
|
||||
}
|
||||
Reference in New Issue
Block a user