Security update for permissions_by_term
[yaffs-website] / node_modules / uncss / node_modules / lodash / chain.js
1 var lodash = require('./wrapperLodash');
2
3 /**
4  * Creates a `lodash` object that wraps `value` with explicit method chaining enabled.
5  * The result of such method chaining must be unwrapped with `_#value`.
6  *
7  * @static
8  * @memberOf _
9  * @category Seq
10  * @param {*} value The value to wrap.
11  * @returns {Object} Returns the new `lodash` wrapper instance.
12  * @example
13  *
14  * var users = [
15  *   { 'user': 'barney',  'age': 36 },
16  *   { 'user': 'fred',    'age': 40 },
17  *   { 'user': 'pebbles', 'age': 1 }
18  * ];
19  *
20  * var youngest = _
21  *   .chain(users)
22  *   .sortBy('age')
23  *   .map(function(o) {
24  *     return o.user + ' is ' + o.age;
25  *   })
26  *   .head()
27  *   .value();
28  * // => 'pebbles is 1'
29  */
30 function chain(value) {
31   var result = lodash(value);
32   result.__chain__ = true;
33   return result;
34 }
35
36 module.exports = chain;