source: trip-planner-front/node_modules/lodash/_wrapperClone.js@ 188ee53

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

initial commit

  • Property mode set to 100644
File size: 658 bytes
Line 
1var LazyWrapper = require('./_LazyWrapper'),
2 LodashWrapper = require('./_LodashWrapper'),
3 copyArray = require('./_copyArray');
4
5/**
6 * Creates a clone of `wrapper`.
7 *
8 * @private
9 * @param {Object} wrapper The wrapper to clone.
10 * @returns {Object} Returns the cloned wrapper.
11 */
12function wrapperClone(wrapper) {
13 if (wrapper instanceof LazyWrapper) {
14 return wrapper.clone();
15 }
16 var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
17 result.__actions__ = copyArray(wrapper.__actions__);
18 result.__index__ = wrapper.__index__;
19 result.__values__ = wrapper.__values__;
20 return result;
21}
22
23module.exports = wrapperClone;
Note: See TracBrowser for help on using the repository browser.