*-case packages provide their own types

This commit is contained in:
Andy Hanson
2016-12-13 14:07:46 -08:00
parent c90ceb334e
commit a8ba5fccca
52 changed files with 102 additions and 647 deletions
-9
View File
@@ -1,9 +0,0 @@
import camelCase = require('camel-case');
console.log(camelCase('string')); // => "string"
console.log(camelCase('dot.case')); // => "dotCase"
console.log(camelCase('PascalCase')); // => "pascalCase"
console.log(camelCase('version 1.2.10')); // => "version1_2_10"
console.log(camelCase('STRING 1.2', 'tr')); // => "strıng1_2"
-8
View File
@@ -1,8 +0,0 @@
// Type definitions for camel-case
// Project: https://github.com/blakeembrey/camel-case
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function camelCase(string: string, locale?: string): string;
export = camelCase;
-19
View File
@@ -1,19 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"camel-case-tests.ts"
]
}
-37
View File
@@ -1,37 +0,0 @@
import changeCase = require("change-case");
var s: string;
var b: boolean;
s = changeCase.dot(s);
s = changeCase.dotCase(s);
s = changeCase.swap(s);
s = changeCase.swapCase(s);
s = changeCase.path(s);
s = changeCase.pathCase(s);
s = changeCase.upper(s);
s = changeCase.upperCase(s);
s = changeCase.lower(s);
s = changeCase.lowerCase(s);
s = changeCase.camel(s);
s = changeCase.camelCase(s);
s = changeCase.snake(s);
s = changeCase.snakeCase(s);
s = changeCase.title(s);
s = changeCase.titleCase(s);
s = changeCase.param(s);
s = changeCase.paramCase(s);
s = changeCase.pascal(s);
s = changeCase.pascalCase(s);
s = changeCase.constant(s);
s = changeCase.constantCase(s);
s = changeCase.sentence(s);
s = changeCase.sentenceCase(s);
b = changeCase.isUpper(s);
b = changeCase.isUpperCase(s);
b = changeCase.isLower(s);
b = changeCase.isLowerCase(s);
s = changeCase.ucFirst(s);
s = changeCase.upperCaseFirst(s);
s = changeCase.lcFirst(s);
s = changeCase.lowerCaseFirst(s);
-37
View File
@@ -1,37 +0,0 @@
// Type definitions for change-case
// Project: https://github.com/blakeembrey/change-case
// Definitions by: Asana <https://asana.com>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export function dot(s: string): string;
export function dotCase(s: string): string;
export function swap(s: string): string;
export function swapCase(s: string): string;
export function path(s: string): string;
export function pathCase(s: string): string;
export function upper(s: string): string;
export function upperCase(s: string): string;
export function lower(s: string): string;
export function lowerCase(s: string): string;
export function camel(s: string): string;
export function camelCase(s: string): string;
export function snake(s: string): string;
export function snakeCase(s: string): string;
export function title(s: string): string;
export function titleCase(s: string): string;
export function param(s: string): string;
export function paramCase(s: string): string;
export function pascal(s: string): string;
export function pascalCase(s: string): string;
export function constant(s: string): string;
export function constantCase(s: string): string;
export function sentence(s: string): string;
export function sentenceCase(s: string): string;
export function isUpper(s: string): boolean;
export function isUpperCase(s: string): boolean;
export function isLower(s: string): boolean;
export function isLowerCase(s: string): boolean;
export function ucFirst(s: string): string;
export function upperCaseFirst(s: string): string;
export function lcFirst(s: string): string;
export function lowerCaseFirst(s: string): string;
-19
View File
@@ -1,19 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"change-case-tests.ts"
]
}
-8
View File
@@ -1,8 +0,0 @@
import constantCase = require('constant-case');
console.log(constantCase('string')); // => "STRING"
console.log(constantCase('PascalCase')); // => "PASCAL_CASE"
console.log(constantCase('myString', 'tr')); // => "MY_STRİNG"
-8
View File
@@ -1,8 +0,0 @@
// Type definitions for constant-case
// Project: https://github.com/blakeembrey/constant-case
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function constantCase(string: string, locale?: string): string;
export = constantCase;
-19
View File
@@ -1,19 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"constant-case-tests.ts"
]
}
-8
View File
@@ -1,8 +0,0 @@
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"
-8
View File
@@ -1,8 +0,0 @@
// 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/DefinitelyTyped/DefinitelyTyped
declare function dotCase(string: string, locale?: string): string;
export = dotCase;
-19
View File
@@ -1,19 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"dot-case-tests.ts"
]
}
-8
View File
@@ -1,8 +0,0 @@
// Type definitions for is-lower-case
// Project: https://github.com/blakeembrey/is-lower-case
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function isLowerCase(string: string): boolean;
export = isLowerCase;
-6
View File
@@ -1,6 +0,0 @@
import isLowerCase = require('is-lower-case')
console.log(isLowerCase('string')); // => true
console.log(isLowerCase('String')); // => false
console.log(isLowerCase('STRING')); // => false
-19
View File
@@ -1,19 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"is-lower-case-tests.ts"
]
}
-8
View File
@@ -1,8 +0,0 @@
// Type definitions for is-upper-case
// Project: https://github.com/blakeembrey/is-upper-case
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function isUpperCase(string: string, locale?: string): boolean;
export = isUpperCase;
-6
View File
@@ -1,6 +0,0 @@
import isUpperCase = require('is-upper-case')
console.log(isUpperCase('STRING')); // => true
console.log(isUpperCase('String')); // => false
console.log(isUpperCase('string')); // => false
-19
View File
@@ -1,19 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"is-upper-case-tests.ts"
]
}
-8
View File
@@ -1,8 +0,0 @@
// Type definitions for lower-case-first
// Project: https://github.com/blakeembrey/lower-case-first
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function lowerCaseFirst(string: string, locale?: string): string;
export = lowerCaseFirst;
@@ -1,6 +0,0 @@
import lowerCaseFirst = require('lower-case-first');
console.log(lowerCaseFirst(null)); // => ""
console.log(lowerCaseFirst('STRING')); // => "sTRING"
-19
View File
@@ -1,19 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"lower-case-first-tests.ts"
]
}
-8
View File
@@ -1,8 +0,0 @@
// Type definitions for lower-case
// Project: https://github.com/blakeembrey/lower-case
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function lowerCase(string: any, locale?: string): string;
export = lowerCase;
-8
View File
@@ -1,8 +0,0 @@
import lowerCase = require('lower-case');
console.log(lowerCase(null)); // => ""
console.log(lowerCase('STRING')); // => "string"
console.log(lowerCase('string', 'tr')); // => "strıng"
console.log(lowerCase({ toString: function() { return 'TEST' } })); // => "test"
-19
View File
@@ -1,19 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"lower-case-tests.ts"
]
}
+102
View File
@@ -94,6 +94,108 @@
"typingsPackageName": "normalizr",
"sourceRepoURL": "https://github.com/paularmstrong/normalizr",
"asOfVersion": "2.0.18"
},
{
"libraryName": "camel-case",
"typingsPackageName": "camel-case",
"sourceRepoUrl": "https://github.com/blakeembrey/camel-case",
"asOfVersion": "1.2.1"
},
{
"libraryName": "change-case",
"typingsPackageName": "change-case",
"sourceRepoUrl": "https://github.com/blakeembrey/change-case",
"asOfVersion": "2.3.1"
},
{
"libraryName": "constant-case",
"typingsPackageName": "constant-case",
"sourceRepoUrl": "https://github.com/blakeembrey/constant-case",
"asOfVersion": "1.1.2"
},
{
"libraryName": "dot-case",
"typingsPackageName": "dot-case",
"sourceRepoUrl": "https://github.com/blakeembrey/dot-case",
"asOfVersion": "1.1.2"
},
{
"libraryName": "is-lower-case",
"typingsPackageName": "is-lower-case",
"sourceRepoUrl": "https://github.com/blakeembrey/is-lower-case",
"asOfVersion": "1.1.2"
},
{
"libraryName": "is-upper-case",
"typingsPackageName": "is-upper-case",
"sourceRepoUrl": "https://github.com/blakeembrey/is-upper-case",
"asOfVersion": "1.1.2"
},
{
"libraryName": "lower-case",
"typingsPackageName": "lower-case",
"sourceRepoUrl": "https://github.com/blakeembrey/lower-case",
"asOfVersion": "1.1.3"
},
{
"libraryName": "lower-case-first",
"typingsPackageName": "lower-case-first",
"sourceRepoUrl": "https://github.com/blakeembrey/lower-case-first",
"asOfVersion": "1.0.1"
},
{
"libraryName": "param-case",
"typingsPackageName": "param-case",
"sourceRepoUrl": "https://github.com/blakeembrey/param-case",
"asOfVersion": "1.1.2"
},
{
"libraryName": "pascal-case",
"typingsPackageName": "pascal-case",
"sourceRepoUrl": "https://github.com/blakeembrey/pascal-case",
"asOfVersion": "1.1.2"
},
{
"libraryName": "path-case",
"typingsPackageName": "path-case",
"sourceRepoUrl": "https://github.com/blakeembrey/path-case",
"asOfVersion": "1.1.2"
},
{
"libraryName": "sentence-case",
"typingsPackageName": "sentence-case",
"sourceRepoUrl": "https://github.com/blakeembrey/sentence-case",
"asOfVersion": "1.1.3"
},
{
"libraryName": "snake-case",
"typingsPackageName": "snake-case",
"sourceRepoURL": "https://github.com/blakeembrey/snake-case",
"asOfVersion": "1.1.2"
},
{
"libraryName": "swap-case",
"typingsPackageName": "swap-case",
"sourceRepoUrl": "https://github.com/blakeembrey/swap-case",
"asOfVersion": "1.1.2"
},
{
"libraryName": "title-case",
"typingsPackageName": "title-case",
"sourceRepoUrl": "https://github.com/blakeembrey/title-case",
"asOfVersion": "1.1.2"
},
{
"libraryName": "upper-case",
"typingsPackageName": "upper-case",
"sourceRepoUrl": "https://github.com/blakeembrey/upper-case",
"asOfVersion": "1.1.3"
},
{
"libraryName": "upper-case-first",
"typingsPackageName": "upper-case-first",
"sourceRepoUrl": "https://github.com/blakeembrey/upper-case-first",
"asOfVersion": "1.1.2"
}
]
}
-8
View File
@@ -1,8 +0,0 @@
// Type definitions for param-case
// Project: https://github.com/blakeembrey/param-case
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function paramCase(string: string, locale?: string): string;
export = paramCase;
-8
View File
@@ -1,8 +0,0 @@
import paramCase = require('param-case');
console.log(paramCase('string')); // => "string"
console.log(paramCase('camelCase')); // => "camel-case"
console.log(paramCase('sentence case')); // => "sentence-case"
console.log(paramCase('MY STRING', 'tr')); // => "my-strıng"
-19
View File
@@ -1,19 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"param-case-tests.ts"
]
}
-8
View File
@@ -1,8 +0,0 @@
// Type definitions for pascal-case
// Project: https://github.com/blakeembrey/pascal-case
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function pascalCase(string: string, locale?: string): string;
export = pascalCase;
-8
View File
@@ -1,8 +0,0 @@
import pascalCase = require('pascal-case');
console.log(pascalCase('string')); // => "String"
console.log(pascalCase('camelCase')); // => "CamelCase"
console.log(pascalCase('sentence case')); // => "SentenceCase"
console.log(pascalCase('MY STRING', 'tr')); // => "MyStrıng"
-19
View File
@@ -1,19 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"pascal-case-tests.ts"
]
}
-8
View File
@@ -1,8 +0,0 @@
// Type definitions for path-case
// Project: https://github.com/blakeembrey/path-case
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function pathCase(string: string, locale?: string): string;
export = pathCase;
-8
View File
@@ -1,8 +0,0 @@
import pathCase = require('path-case');
console.log(pathCase('string')); // => "string"
console.log(pathCase('camelCase')); // => "camel/case"
console.log(pathCase('sentence case')); // => "sentence/case"
console.log(pathCase('MY STRING', 'tr')); // => "my.strıng"
-19
View File
@@ -1,19 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"path-case-tests.ts"
]
}
-8
View File
@@ -1,8 +0,0 @@
// 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/DefinitelyTyped/DefinitelyTyped
declare function sentenceCase(string: string, locale?: string, repl?: string): string;
export = sentenceCase;
-12
View File
@@ -1,12 +0,0 @@
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"
-19
View File
@@ -1,19 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"sentence-case-tests.ts"
]
}
-8
View File
@@ -1,8 +0,0 @@
// 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/DefinitelyTyped/DefinitelyTyped
declare function snakeCase(string: string, locale?: string): string;
export = snakeCase;
-8
View File
@@ -1,8 +0,0 @@
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"
-19
View File
@@ -1,19 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"snake-case-tests.ts"
]
}
-8
View File
@@ -1,8 +0,0 @@
// 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/DefinitelyTyped/DefinitelyTyped
declare function swapCase(string: string, locale?: string): string;
export = swapCase;
-9
View File
@@ -1,9 +0,0 @@
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"
-19
View File
@@ -1,19 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"swap-case-tests.ts"
]
}
-8
View File
@@ -1,8 +0,0 @@
// Type definitions for title-case
// Project: https://github.com/blakeembrey/title-case
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function titleCase(string1: string, string2?: string): string;
export = titleCase;
-6
View File
@@ -1,6 +0,0 @@
import titleCase = require('title-case');
console.log(titleCase('string')); // => "String"
console.log(titleCase('PascalCase')); // => "Pascal Case"
console.log(titleCase('STRING', 'tr')); // => "Strıng"
-19
View File
@@ -1,19 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"title-case-tests.ts"
]
}
-8
View File
@@ -1,8 +0,0 @@
// Type definitions for upper-case-first
// Project: https://github.com/blakeembrey/upper-case-first
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function upperCaseFirst(string: string): string;
export = upperCaseFirst;
-19
View File
@@ -1,19 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"upper-case-first-tests.ts"
]
}
@@ -1,5 +0,0 @@
import upperCaseFirst = require('upper-case-first');
console.log(upperCaseFirst(null)); // => ""
console.log(upperCaseFirst('string')); // => "String"
-8
View File
@@ -1,8 +0,0 @@
// Type definitions for upper-case
// Project: https://github.com/blakeembrey/upper-case
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function upperCase(string: any, locale?: string): string;
export = upperCase;
-19
View File
@@ -1,19 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"upper-case-tests.ts"
]
}
-7
View File
@@ -1,7 +0,0 @@
import upperCase = require('upper-case');
console.log(upperCase(null)); // => ""
console.log(upperCase('string')); // => "STRING"
console.log(upperCase({ toString: function() { return 'test' } })); // => "TEST"