summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperCommit.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperCommit.js')
-rw-r--r--deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperCommit.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperCommit.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperCommit.js
new file mode 100644
index 0000000000..c3d289804b
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperCommit.js
@@ -0,0 +1,32 @@
+var LodashWrapper = require('../internal/LodashWrapper');
+
+/**
+ * Executes the chained sequence and returns the wrapped result.
+ *
+ * @name commit
+ * @memberOf _
+ * @category Chain
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2];
+ * var wrapped = _(array).push(3);
+ *
+ * console.log(array);
+ * // => [1, 2]
+ *
+ * wrapped = wrapped.commit();
+ * console.log(array);
+ * // => [1, 2, 3]
+ *
+ * wrapped.last();
+ * // => 3
+ *
+ * console.log(array);
+ * // => [1, 2, 3]
+ */
+function wrapperCommit() {
+ return new LodashWrapper(this.value(), this.__chain__);
+}
+
+module.exports = wrapperCommit;