CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes45downloads
unary.js23 linesDownload Raw Back to lodash-es
1import ary from './ary.js';2 3/**4 * Creates a function that accepts up to one argument, ignoring any5 * additional arguments.6 *7 * @static8 * @memberOf _9 * @since 4.0.010 * @category Function11 * @param {Function} func The function to cap arguments for.12 * @returns {Function} Returns the new capped function.13 * @example14 *15 * _.map(['6', '8', '10'], _.unary(parseInt));16 * // => [6, 8, 10]17 */18function unary(func) {19  return ary(func, 1);20}21 22export default unary;23 
basant307/AI_Governance_Project · CoolFace