summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/lodash/internal/lazyClone.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/lodash/internal/lazyClone.js')
-rw-r--r--deps/npm/node_modules/lodash/internal/lazyClone.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/deps/npm/node_modules/lodash/internal/lazyClone.js b/deps/npm/node_modules/lodash/internal/lazyClone.js
new file mode 100644
index 0000000000..04c222b20e
--- /dev/null
+++ b/deps/npm/node_modules/lodash/internal/lazyClone.js
@@ -0,0 +1,23 @@
+var LazyWrapper = require('./LazyWrapper'),
+ arrayCopy = require('./arrayCopy');
+
+/**
+ * Creates a clone of the lazy wrapper object.
+ *
+ * @private
+ * @name clone
+ * @memberOf LazyWrapper
+ * @returns {Object} Returns the cloned `LazyWrapper` object.
+ */
+function lazyClone() {
+ var result = new LazyWrapper(this.__wrapped__);
+ result.__actions__ = arrayCopy(this.__actions__);
+ result.__dir__ = this.__dir__;
+ result.__filtered__ = this.__filtered__;
+ result.__iteratees__ = arrayCopy(this.__iteratees__);
+ result.__takeCount__ = this.__takeCount__;
+ result.__views__ = arrayCopy(this.__views__);
+ return result;
+}
+
+module.exports = lazyClone;