source: trip-planner-front/node_modules/lodash/_setWrapToString.js@ 6c1585f

Last change on this file since 6c1585f was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 847 bytes
Line 
1var getWrapDetails = require('./_getWrapDetails'),
2 insertWrapDetails = require('./_insertWrapDetails'),
3 setToString = require('./_setToString'),
4 updateWrapDetails = require('./_updateWrapDetails');
5
6/**
7 * Sets the `toString` method of `wrapper` to mimic the source of `reference`
8 * with wrapper details in a comment at the top of the source body.
9 *
10 * @private
11 * @param {Function} wrapper The function to modify.
12 * @param {Function} reference The reference function.
13 * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
14 * @returns {Function} Returns `wrapper`.
15 */
16function setWrapToString(wrapper, reference, bitmask) {
17 var source = (reference + '');
18 return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
19}
20
21module.exports = setWrapToString;
Note: See TracBrowser for help on using the repository browser.