blob: 98639e92f6472ede18447356d57b359c43468e43 [file] [log] [blame]
Leo Repp58b9f112021-11-22 11:57:47 +01001/**
2 * The base implementation of `_.unary` without support for storing metadata.
3 *
4 * @private
5 * @param {Function} func The function to cap arguments for.
6 * @returns {Function} Returns the new capped function.
7 */
8function baseUnary(func) {
9 return function(value) {
10 return func(value);
11 };
12}
13
14module.exports = baseUnary;