CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
flip.js29 linesDownload Raw Back to lodash
1var createWrap = require('./_createWrap');2 3/** Used to compose bitmasks for function metadata. */4var WRAP_FLIP_FLAG = 512;5 6/**7 * Creates a function that invokes `func` with arguments reversed.8 *9 * @static10 * @memberOf _11 * @since 4.0.012 * @category Function13 * @param {Function} func The function to flip arguments for.14 * @returns {Function} Returns the new flipped function.15 * @example16 *17 * var flipped = _.flip(function() {18 *   return _.toArray(arguments);19 * });20 *21 * flipped('a', 'b', 'c', 'd');22 * // => ['d', 'c', 'b', 'a']23 */24function flip(func) {25  return createWrap(func, WRAP_FLIP_FLAG);26}27 28module.exports = flip;29 
basant307/AI_Governance_Project · CoolFace