Permalink
Cannot retrieve contributors at this time
38 lines (36 sloc)
851 Bytes
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
codeql-action/node_modules/lodash/chain.js
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var lodash = require('./wrapperLodash'); | |
/** | |
* Creates a `lodash` wrapper instance that wraps `value` with explicit method | |
* chain sequences enabled. The result of such sequences must be unwrapped | |
* with `_#value`. | |
* | |
* @static | |
* @memberOf _ | |
* @since 1.3.0 | |
* @category Seq | |
* @param {*} value The value to wrap. | |
* @returns {Object} Returns the new `lodash` wrapper instance. | |
* @example | |
* | |
* var users = [ | |
* { 'user': 'barney', 'age': 36 }, | |
* { 'user': 'fred', 'age': 40 }, | |
* { 'user': 'pebbles', 'age': 1 } | |
* ]; | |
* | |
* var youngest = _ | |
* .chain(users) | |
* .sortBy('age') | |
* .map(function(o) { | |
* return o.user + ' is ' + o.age; | |
* }) | |
* .head() | |
* .value(); | |
* // => 'pebbles is 1' | |
*/ | |
function chain(value) { | |
var result = lodash(value); | |
result.__chain__ = true; | |
return result; | |
} | |
module.exports = chain; |