mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 23:57:49 +00:00
Add docs for split out functions. [ci skip]
This commit is contained in:
25
lodash.js
25
lodash.js
@@ -6146,7 +6146,7 @@
|
||||
|
||||
/**
|
||||
* Sets the `toString` method of `wrapper` to mimic the source of `ref`
|
||||
* with wrapper details added to a comment at the top of the source body.
|
||||
* with wrapper details in a comment at the top of the source body.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} wrapper The function to modify.
|
||||
@@ -6163,11 +6163,26 @@
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Extracts the wrapper details from the `source` body comment.
|
||||
*
|
||||
* @private
|
||||
* @param {string} source The source to inspect.
|
||||
* @returns {Array} Returns the wrapper details.
|
||||
*/
|
||||
function getWrapDetails(source) {
|
||||
var match = source.match(reWrapDetails);
|
||||
return match ? match[1].split(reSplitDetails) : [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts the wrapper `details` in a comment at the top of the `source` body.
|
||||
*
|
||||
* @private
|
||||
* @param {string} source The source to modify.
|
||||
* @returns {Array} details The details to insert.
|
||||
* @returns {string} Returns the modified source.
|
||||
*/
|
||||
function insertWrapDetails(source, details) {
|
||||
var length = details.length,
|
||||
lastIndex = length - 1;
|
||||
@@ -6177,6 +6192,14 @@
|
||||
return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the wrapper `details` base on the `bitmask` flags.
|
||||
*
|
||||
* @private
|
||||
* @returns {Array} details The details to insert.
|
||||
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
|
||||
* @returns {Array} Returns `details`.
|
||||
*/
|
||||
function updateWrapDetails(details, bitmask) {
|
||||
arrayEach(wrapFlags, function(pair) {
|
||||
var value = '_.' + pair[0];
|
||||
|
||||
Reference in New Issue
Block a user