mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
Cleanup ticks in method docs. [ci skip]
This commit is contained in:
57
lodash.js
57
lodash.js
@@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to match ES6 template delimiters
|
* Used to match ES6 template delimiters
|
||||||
* http://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-string-literals
|
* http://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components
|
||||||
*/
|
*/
|
||||||
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
|
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
|
||||||
|
|
||||||
@@ -450,7 +450,7 @@
|
|||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
* @returns {boolean} Returns `true` if the `value` is a DOM node, else `false`.
|
* @returns {boolean} Returns `true` if `value` is a DOM node, else `false`.
|
||||||
*/
|
*/
|
||||||
function isNode(value) {
|
function isNode(value) {
|
||||||
// IE < 9 presents DOM nodes as `Object` objects except they have `toString`
|
// IE < 9 presents DOM nodes as `Object` objects except they have `toString`
|
||||||
@@ -2119,7 +2119,7 @@
|
|||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
* @returns {boolean} Returns `true` if the `value` is a native function, else `false`.
|
* @returns {boolean} Returns `true` if `value` is a native function, else `false`.
|
||||||
*/
|
*/
|
||||||
function isNative(value) {
|
function isNative(value) {
|
||||||
return typeof value == 'function' && reNative.test(fnToString.call(value));
|
return typeof value == 'function' && reNative.test(fnToString.call(value));
|
||||||
@@ -2178,14 +2178,11 @@
|
|||||||
return typeof result == 'undefined' || hasOwnProperty.call(value, result);
|
return typeof result == 'undefined' || hasOwnProperty.call(value, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A fallback implementation of `Object.keys` which creates an array of the
|
* A fallback implementation of `Object.keys` which creates an array of the
|
||||||
* own enumerable property names of `object`.
|
* own enumerable property names of `object`.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @type Function
|
|
||||||
* @param {Object} object The object to inspect.
|
* @param {Object} object The object to inspect.
|
||||||
* @returns {Array} Returns the array of property names.
|
* @returns {Array} Returns the array of property names.
|
||||||
*/
|
*/
|
||||||
@@ -3991,10 +3988,10 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invokes the method named by `methodName` on each element in the `collection`
|
* Invokes the method named by `methodName` on each element in the collection
|
||||||
* returning an array of the results of each invoked method. Additional arguments
|
* returning an array of the results of each invoked method. Additional arguments
|
||||||
* will be provided to each invoked method. If `methodName` is a function it
|
* will be provided to each invoked method. If `methodName` is a function it
|
||||||
* will be invoked for, and `this` bound to, each element in the `collection`.
|
* will be invoked for, and `this` bound to, each element in the collection.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
@@ -4493,7 +4490,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the size of the `collection` by returning `collection.length` for arrays
|
* Gets the size of the collection by returning `collection.length` for arrays
|
||||||
* and array-like objects or the number of own enumerable properties for objects.
|
* and array-like objects or the number of own enumerable properties for objects.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
@@ -4661,7 +4658,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts the `collection` to an array.
|
* Converts `collection` to an array.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
@@ -4685,7 +4682,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs a deep comparison between each element in `collection` and the
|
* Performs a deep comparison between each element in `collection` and the
|
||||||
* `source` object, returning an array of all elements that have equivalent
|
* source object, returning an array of all elements that have equivalent
|
||||||
* property values.
|
* property values.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
@@ -4713,7 +4710,7 @@
|
|||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a function that executes `func`, with the `this` binding and
|
* Creates a function that executes `func`, with the `this` binding and
|
||||||
* arguments of the created function, only after being called `n` times.
|
* arguments of the created function, only after being called `n` times.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
@@ -5752,7 +5749,6 @@
|
|||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @type Function
|
|
||||||
* @category Objects
|
* @category Objects
|
||||||
* @param {Object} object The object to iterate over.
|
* @param {Object} object The object to iterate over.
|
||||||
* @param {Function} [callback=identity] The function called per iteration.
|
* @param {Function} [callback=identity] The function called per iteration.
|
||||||
@@ -5956,7 +5952,7 @@
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Objects
|
* @category Objects
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
* @returns {boolean} Returns `true` if the `value` is an `arguments` object, else `false`.
|
* @returns {boolean} Returns `true` if `value` is an `arguments` object, else `false`.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* (function() { return _.isArguments(arguments); })();
|
* (function() { return _.isArguments(arguments); })();
|
||||||
@@ -5982,10 +5978,9 @@
|
|||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @type Function
|
|
||||||
* @category Objects
|
* @category Objects
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
* @returns {boolean} Returns `true` if the `value` is an array, else `false`.
|
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.isArray([1, 2, 3]);
|
* _.isArray([1, 2, 3]);
|
||||||
@@ -6006,7 +6001,7 @@
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Objects
|
* @category Objects
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
* @returns {boolean} Returns `true` if the `value` is a boolean value, else `false`.
|
* @returns {boolean} Returns `true` if `value` is a boolean value, else `false`.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.isBoolean(false);
|
* _.isBoolean(false);
|
||||||
@@ -6027,7 +6022,7 @@
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Objects
|
* @category Objects
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
* @returns {boolean} Returns `true` if the `value` is a date, else `false`.
|
* @returns {boolean} Returns `true` if `value` is a date, else `false`.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.isDate(new Date);
|
* _.isDate(new Date);
|
||||||
@@ -6047,7 +6042,7 @@
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Objects
|
* @category Objects
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
* @returns {boolean} Returns `true` if the `value` is a DOM element, else `false`.
|
* @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.isElement(document.body);
|
* _.isElement(document.body);
|
||||||
@@ -6077,7 +6072,7 @@
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Objects
|
* @category Objects
|
||||||
* @param {Array|Object|string} value The value to inspect.
|
* @param {Array|Object|string} value The value to inspect.
|
||||||
* @returns {boolean} Returns `true` if the `value` is empty, else `false`.
|
* @returns {boolean} Returns `true` if `value` is empty, else `false`.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.isEmpty(null);
|
* _.isEmpty(null);
|
||||||
@@ -6184,7 +6179,7 @@
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Objects
|
* @category Objects
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
* @returns {boolean} Returns `true` if the `value` is finite, else `false`.
|
* @returns {boolean} Returns `true` if `value` is finite, else `false`.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.isFinite(-101);
|
* _.isFinite(-101);
|
||||||
@@ -6213,7 +6208,7 @@
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Objects
|
* @category Objects
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
* @returns {boolean} Returns `true` if the `value` is a function, else `false`.
|
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.isFunction(_);
|
* _.isFunction(_);
|
||||||
@@ -6240,7 +6235,7 @@
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Objects
|
* @category Objects
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
* @returns {boolean} Returns `true` if the `value` is an object, else `false`.
|
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.isObject({});
|
* _.isObject({});
|
||||||
@@ -6272,7 +6267,7 @@
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Objects
|
* @category Objects
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
* @returns {boolean} Returns `true` if the `value` is `NaN`, else `false`.
|
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.isNaN(NaN);
|
* _.isNaN(NaN);
|
||||||
@@ -6300,7 +6295,7 @@
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Objects
|
* @category Objects
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
* @returns {boolean} Returns `true` if the `value` is `null`, else `false`.
|
* @returns {boolean} Returns `true` if `value` is `null`, else `false`.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.isNull(null);
|
* _.isNull(null);
|
||||||
@@ -6323,7 +6318,7 @@
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Objects
|
* @category Objects
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
* @returns {boolean} Returns `true` if the `value` is a number, else `false`.
|
* @returns {boolean} Returns `true` if `value` is a number, else `false`.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.isNumber(8.4);
|
* _.isNumber(8.4);
|
||||||
@@ -6384,7 +6379,7 @@
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Objects
|
* @category Objects
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
* @returns {boolean} Returns `true` if the `value` is a regular expression, else `false`.
|
* @returns {boolean} Returns `true` if `value` is a regular expression, else `false`.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.isRegExp(/abc/);
|
* _.isRegExp(/abc/);
|
||||||
@@ -6406,7 +6401,7 @@
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Objects
|
* @category Objects
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
* @returns {boolean} Returns `true` if the `value` is a string, else `false`.
|
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.isString('abc');
|
* _.isString('abc');
|
||||||
@@ -6427,7 +6422,7 @@
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Objects
|
* @category Objects
|
||||||
* @param {*} value The value to check.
|
* @param {*} value The value to check.
|
||||||
* @returns {boolean} Returns `true` if the `value` is `undefined`, else `false`.
|
* @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.isUndefined(void 0);
|
* _.isUndefined(void 0);
|
||||||
@@ -7849,8 +7844,8 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts `value` to an integer of the specified radix. If `radix` is
|
* Converts `value` to an integer of the specified radix. If `radix` is
|
||||||
* `undefined` or `0` a `radix` of `10` is used unless the `value` is a
|
* `undefined` or `0` a `radix` of `10` is used unless `value` is a hexadecimal,
|
||||||
* hexadecimal, in which case a `radix` of `16` is used.
|
* in which case a `radix` of `16` is used.
|
||||||
*
|
*
|
||||||
* Note: This method avoids differences in native ES3 and ES5 `parseInt`
|
* Note: This method avoids differences in native ES3 and ES5 `parseInt`
|
||||||
* implementations. See the [ES5 spec](http://es5.github.io/#E)
|
* implementations. See the [ES5 spec](http://es5.github.io/#E)
|
||||||
|
|||||||
Reference in New Issue
Block a user