Remove the constant module.

This commit is contained in:
John-David Dalton
2017-01-28 23:33:05 -08:00
parent 42b48b3d86
commit 41133cf40f

View File

@@ -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;