From 41133cf40f9bf4673f3c298d6bc1c3173698ad1d Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sat, 28 Jan 2017 23:33:05 -0800 Subject: [PATCH] Remove the `constant` module. --- constant.js | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 constant.js diff --git a/constant.js b/constant.js deleted file mode 100644 index 1e2e0d160..000000000 --- a/constant.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Creates a function that returns `value`. - * - * @since 2.4.0 - * @category Util - * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new constant function. - * @example - * - * const objects = times(2, constant({ 'a': 1 })); - * - * console.log(objects); - * // => [{ 'a': 1 }, { 'a': 1 }] - * - * console.log(objects[0] === objects[1]); - * // => true - */ -function constant(value) { - return () => value; -} - -export default constant;