(feature) Add _.toLower and _.toUpper

This commit is contained in:
DomiR
2016-01-23 14:43:48 +01:00
parent 3276cdc914
commit 9005355238
2 changed files with 108 additions and 0 deletions
+32
View File
@@ -8516,6 +8516,38 @@ module TestTemplate {
}
}
// _.toLower
module TestToLower {
{
let result: string;
result = _.toLower('fred, barney, & pebbles');
result = _('fred, barney, & pebbles').toLower();
}
{
let result: _.LoDashExplicitWrapper<string>;
result = _('fred, barney, &amp; pebbles').chain().toLower();
}
}
// _.toUpper
module TestToUpper {
{
let result: string;
result = _.toUpper('fred, barney, &amp; pebbles');
result = _('fred, barney, &amp; pebbles').toUpper();
}
{
let result: _.LoDashExplicitWrapper<string>;
result = _('fred, barney, &amp; pebbles').chain().toUpper();
}
}
// _.trim
module TestTrim {
{
+76
View File
@@ -13473,6 +13473,82 @@ declare module _ {
template(options?: TemplateOptions): LoDashExplicitObjectWrapper<TemplateExecutor>;
}
//_.toLower
interface LoDashStatic {
/**
* Converts `string`, as a whole, to lower case.
*
* @static
* @memberOf _
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the lower cased string.
* @example
*
* _.toLower('--Foo-Bar');
* // => '--foo-bar'
*
* _.toLower('fooBar');
* // => 'foobar'
*
* _.toLower('__FOO_BAR__');
* // => '__foo_bar__'
*/
toLower(string?: string): string;
}
interface LoDashImplicitWrapper<T> {
/**
* @see _.toLower
*/
toLower(): string;
}
interface LoDashExplicitWrapper<T> {
/**
* @see _.toLower
*/
toLower(): LoDashExplicitWrapper<string>;
}
//_.toUpper
interface LoDashStatic {
/**
* Converts `string`, as a whole, to upper case.
*
* @static
* @memberOf _
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the upper cased string.
* @example
*
* _.toUpper('--foo-bar');
* // => '--FOO-BAR'
*
* _.toUpper('fooBar');
* // => 'FOOBAR'
*
* _.toUpper('__foo_bar__');
* // => '__FOO_BAR__'
*/
toUpper(string?: string): string;
}
interface LoDashImplicitWrapper<T> {
/**
* @see _.toUpper
*/
toUpper(): string;
}
interface LoDashExplicitWrapper<T> {
/**
* @see _.toUpper
*/
toUpper(): LoDashExplicitWrapper<string>;
}
//_.trim
interface LoDashStatic {
/**