Version 1
[yaffs-website] / node_modules / grunt-legacy-log-utils / node_modules / lodash / commit.js
diff --git a/node_modules/grunt-legacy-log-utils/node_modules/lodash/commit.js b/node_modules/grunt-legacy-log-utils/node_modules/lodash/commit.js
new file mode 100644 (file)
index 0000000..1f87f50
--- /dev/null
@@ -0,0 +1,32 @@
+var LodashWrapper = require('./_LodashWrapper');
+
+/**
+ * Executes the chained sequence and returns the wrapped result.
+ *
+ * @name commit
+ * @memberOf _
+ * @category Seq
+ * @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;