Version 1
[yaffs-website] / node_modules / grunt-legacy-util / node_modules / lodash / wrapperChain.js
diff --git a/node_modules/grunt-legacy-util/node_modules/lodash/wrapperChain.js b/node_modules/grunt-legacy-util/node_modules/lodash/wrapperChain.js
new file mode 100644 (file)
index 0000000..52f8531
--- /dev/null
@@ -0,0 +1,33 @@
+var chain = require('./chain');
+
+/**
+ * Enables explicit method chaining on the wrapper object.
+ *
+ * @name chain
+ * @memberOf _
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ *   { 'user': 'barney', 'age': 36 },
+ *   { 'user': 'fred',   'age': 40 }
+ * ];
+ *
+ * // A sequence without explicit chaining.
+ * _(users).head();
+ * // => { 'user': 'barney', 'age': 36 }
+ *
+ * // A sequence with explicit chaining.
+ * _(users)
+ *   .chain()
+ *   .head()
+ *   .pick('user')
+ *   .value();
+ * // => { 'user': 'barney' }
+ */
+function wrapperChain() {
+  return chain(this);
+}
+
+module.exports = wrapperChain;