Permalink
Cannot retrieve contributors at this time
28 lines (27 sloc)
674 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/thru.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
/** | |
* This method is like `_.tap` except that it returns the result of `interceptor`. | |
* The purpose of this method is to "pass thru" values replacing intermediate | |
* results in a method chain sequence. | |
* | |
* @static | |
* @memberOf _ | |
* @since 3.0.0 | |
* @category Seq | |
* @param {*} value The value to provide to `interceptor`. | |
* @param {Function} interceptor The function to invoke. | |
* @returns {*} Returns the result of `interceptor`. | |
* @example | |
* | |
* _(' abc ') | |
* .chain() | |
* .trim() | |
* .thru(function(value) { | |
* return [value]; | |
* }) | |
* .value(); | |
* // => ['abc'] | |
*/ | |
function thru(value, interceptor) { | |
return interceptor(value); | |
} | |
module.exports = thru; |