mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Remove references to _.
This commit is contained in:
9
trim.js
9
trim.js
@@ -12,22 +12,21 @@ const reTrim = /^\s+|\s+$/g;
|
||||
* Removes leading and trailing whitespace or specified characters from `string`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 3.0.0
|
||||
* @category String
|
||||
* @param {string} [string=''] The string to trim.
|
||||
* @param {string} [chars=whitespace] The characters to trim.
|
||||
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
||||
* @param- {Object} [guard] Enables use as an iteratee for methods like `map`.
|
||||
* @returns {string} Returns the trimmed string.
|
||||
* @example
|
||||
*
|
||||
* _.trim(' abc ');
|
||||
* trim(' abc ');
|
||||
* // => 'abc'
|
||||
*
|
||||
* _.trim('-_-abc-_-', '_-');
|
||||
* trim('-_-abc-_-', '_-');
|
||||
* // => 'abc'
|
||||
*
|
||||
* _.map([' foo ', ' bar '], _.trim);
|
||||
* map([' foo ', ' bar '], trim);
|
||||
* // => ['foo', 'bar']
|
||||
*/
|
||||
function trim(string, chars, guard) {
|
||||
|
||||
Reference in New Issue
Block a user