source: imaps-frontend/node_modules/lodash-es/_wrapperClone.js@ d565449

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: 656 bytes
Line 
1import LazyWrapper from './_LazyWrapper.js';
2import LodashWrapper from './_LodashWrapper.js';
3import copyArray from './_copyArray.js';
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
23export default wrapperClone;
Note: See TracBrowser for help on using the repository browser.