mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-30 11:14:27 +08:00
(feature) Add _.lowerCase and _.lowerFirst
This commit is contained in:
@@ -8289,6 +8289,38 @@ module TestKebabCase {
|
||||
}
|
||||
}
|
||||
|
||||
// _.lowerCase
|
||||
module TestLowerCase {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
result = _.lowerCase('Foo Bar');
|
||||
result = _('Foo Bar').lowerCase();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitWrapper<string>;
|
||||
|
||||
result = _('Foo Bar').chain().lowerCase();
|
||||
}
|
||||
}
|
||||
|
||||
// _.lowerFirst
|
||||
module TestLowerFirst {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
result = _.lowerFirst('Foo Bar');
|
||||
result = _('Foo Bar').lowerFirst();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitWrapper<string>;
|
||||
|
||||
result = _('Foo Bar').chain().lowerFirst();
|
||||
}
|
||||
}
|
||||
|
||||
// _.pad
|
||||
module TestPad {
|
||||
{
|
||||
|
||||
Vendored
+73
@@ -13078,6 +13078,79 @@ declare module _ {
|
||||
kebabCase(): LoDashExplicitWrapper<string>;
|
||||
}
|
||||
|
||||
//_.lowerCase
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts `string`, as space separated words, to lower case.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category String
|
||||
* @param {string} [string=''] The string to convert.
|
||||
* @returns {string} Returns the lower cased string.
|
||||
* @example
|
||||
*
|
||||
* _.lowerCase('--Foo-Bar');
|
||||
* // => 'foo bar'
|
||||
*
|
||||
* _.lowerCase('fooBar');
|
||||
* // => 'foo bar'
|
||||
*
|
||||
* _.lowerCase('__FOO_BAR__');
|
||||
* // => 'foo bar'
|
||||
*/
|
||||
lowerCase(string?: string): string;
|
||||
}
|
||||
|
||||
interface LoDashImplicitWrapper<T> {
|
||||
/**
|
||||
* @see _.lowerCase
|
||||
*/
|
||||
lowerCase(): string;
|
||||
}
|
||||
|
||||
interface LoDashExplicitWrapper<T> {
|
||||
/**
|
||||
* @see _.lowerCase
|
||||
*/
|
||||
lowerCase(): LoDashExplicitWrapper<string>;
|
||||
}
|
||||
|
||||
//_.lowerFirst
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Converts the first character of `string` to lower case.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category String
|
||||
* @param {string} [string=''] The string to convert.
|
||||
* @returns {string} Returns the converted string.
|
||||
* @example
|
||||
*
|
||||
* _.lowerFirst('Fred');
|
||||
* // => 'fred'
|
||||
*
|
||||
* _.lowerFirst('FRED');
|
||||
* // => 'fRED'
|
||||
*/
|
||||
lowerFirst(string?: string): string;
|
||||
}
|
||||
|
||||
interface LoDashImplicitWrapper<T> {
|
||||
/**
|
||||
* @see _.lowerFirst
|
||||
*/
|
||||
lowerFirst(): string;
|
||||
}
|
||||
|
||||
interface LoDashExplicitWrapper<T> {
|
||||
/**
|
||||
* @see _.lowerFirst
|
||||
*/
|
||||
lowerFirst(): LoDashExplicitWrapper<string>;
|
||||
}
|
||||
|
||||
//_.pad
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user