Security update for permissions_by_term
[yaffs-website] / node_modules / uncss / node_modules / lodash / thru.js
1 /**
2  * This method is like `_.tap` except that it returns the result of `interceptor`.
3  *
4  * @static
5  * @memberOf _
6  * @category Seq
7  * @param {*} value The value to provide to `interceptor`.
8  * @param {Function} interceptor The function to invoke.
9  * @returns {*} Returns the result of `interceptor`.
10  * @example
11  *
12  * _('  abc  ')
13  *  .chain()
14  *  .trim()
15  *  .thru(function(value) {
16  *    return [value];
17  *  })
18  *  .value();
19  * // => ['abc']
20  */
21 function thru(value, interceptor) {
22   return interceptor(value);
23 }
24
25 module.exports = thru;