mirror of
https://github.com/cachix/install-nix-action.git
synced 2025-06-08 18:04:29 +00:00
v7
This commit is contained in:
parent
033d472283
commit
49df04613e
6774 changed files with 1602535 additions and 1 deletions
46
node_modules/lodash/_updateWrapDetails.js
generated
vendored
Normal file
46
node_modules/lodash/_updateWrapDetails.js
generated
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
var arrayEach = require('./_arrayEach'),
|
||||
arrayIncludes = require('./_arrayIncludes');
|
||||
|
||||
/** Used to compose bitmasks for function metadata. */
|
||||
var WRAP_BIND_FLAG = 1,
|
||||
WRAP_BIND_KEY_FLAG = 2,
|
||||
WRAP_CURRY_FLAG = 8,
|
||||
WRAP_CURRY_RIGHT_FLAG = 16,
|
||||
WRAP_PARTIAL_FLAG = 32,
|
||||
WRAP_PARTIAL_RIGHT_FLAG = 64,
|
||||
WRAP_ARY_FLAG = 128,
|
||||
WRAP_REARG_FLAG = 256,
|
||||
WRAP_FLIP_FLAG = 512;
|
||||
|
||||
/** Used to associate wrap methods with their bit flags. */
|
||||
var wrapFlags = [
|
||||
['ary', WRAP_ARY_FLAG],
|
||||
['bind', WRAP_BIND_FLAG],
|
||||
['bindKey', WRAP_BIND_KEY_FLAG],
|
||||
['curry', WRAP_CURRY_FLAG],
|
||||
['curryRight', WRAP_CURRY_RIGHT_FLAG],
|
||||
['flip', WRAP_FLIP_FLAG],
|
||||
['partial', WRAP_PARTIAL_FLAG],
|
||||
['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
|
||||
['rearg', WRAP_REARG_FLAG]
|
||||
];
|
||||
|
||||
/**
|
||||
* Updates wrapper `details` based on `bitmask` flags.
|
||||
*
|
||||
* @private
|
||||
* @returns {Array} details The details to modify.
|
||||
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
|
||||
* @returns {Array} Returns `details`.
|
||||
*/
|
||||
function updateWrapDetails(details, bitmask) {
|
||||
arrayEach(wrapFlags, function(pair) {
|
||||
var value = '_.' + pair[0];
|
||||
if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
|
||||
details.push(value);
|
||||
}
|
||||
});
|
||||
return details.sort();
|
||||
}
|
||||
|
||||
module.exports = updateWrapDetails;
|
Loading…
Add table
Add a link
Reference in a new issue