main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
845 bytes
|
Rev | Line | |
---|
[d565449] | 1 | import getWrapDetails from './_getWrapDetails.js';
|
---|
| 2 | import insertWrapDetails from './_insertWrapDetails.js';
|
---|
| 3 | import setToString from './_setToString.js';
|
---|
| 4 | import updateWrapDetails from './_updateWrapDetails.js';
|
---|
| 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 | */
|
---|
| 16 | function setWrapToString(wrapper, reference, bitmask) {
|
---|
| 17 | var source = (reference + '');
|
---|
| 18 | return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
|
---|
| 19 | }
|
---|
| 20 |
|
---|
| 21 | export default setWrapToString;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.