Add docs for split out functions. [ci skip]

This commit is contained in:
John-David Dalton
2016-06-14 23:13:32 -07:00
parent 3f1ae77306
commit 4bee8c9ead

View File

@@ -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];