1 var arrayEach = require('./_arrayEach'),
2 arrayIncludes = require('./_arrayIncludes');
4 /** Used to compose bitmasks for function metadata. */
10 PARTIAL_RIGHT_FLAG = 64,
15 /** Used to associate wrap methods with their bit flags. */
19 ['bindKey', BIND_KEY_FLAG],
20 ['curry', CURRY_FLAG],
21 ['curryRight', CURRY_RIGHT_FLAG],
23 ['partial', PARTIAL_FLAG],
24 ['partialRight', PARTIAL_RIGHT_FLAG],
29 * Updates wrapper `details` based on `bitmask` flags.
32 * @returns {Array} details The details to modify.
33 * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
34 * @returns {Array} Returns `details`.
36 function updateWrapDetails(details, bitmask) {
37 arrayEach(wrapFlags, function(pair) {
38 var value = '_.' + pair[0];
39 if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
43 return details.sort();
46 module.exports = updateWrapDetails;