Urara-Blog/node_modules/.pnpm-store/v3/files/49/4b7c1c1fa5a5c5eefce1a18f6d82cc4c0b3b4b8f6381deece762793fda43c7cc9379585d0623577ddbfaafb79932ed630e1a0ca3b455d5ddb3fb4580fc8102
2022-08-14 01:14:53 +08:00

21 lines
847 B
Text

var getWrapDetails = require('./_getWrapDetails'),
insertWrapDetails = require('./_insertWrapDetails'),
setToString = require('./_setToString'),
updateWrapDetails = require('./_updateWrapDetails');
/**
* Sets the `toString` method of `wrapper` to mimic the source of `reference`
* with wrapper details in a comment at the top of the source body.
*
* @private
* @param {Function} wrapper The function to modify.
* @param {Function} reference The reference function.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @returns {Function} Returns `wrapper`.
*/
function setWrapToString(wrapper, reference, bitmask) {
var source = (reference + '');
return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
}
module.exports = setWrapToString;