UNPKG

mocoolka-function

Version:

Function lib for function.

14 lines 591 B
Object.defineProperty(exports, "__esModule", { value: true }); /** * Returns a new function that will return the given value.Note that for * non-primitives the value returned is a reference to the original value. * * This function is known as `const`, `always`, or `K` (for K combinator) in * other languages and libraries. * @since v0.1.0 * @param value -The value to wrap in a function * @return The function return value */ var constant = function (value) { return function () { return value; }; }; exports.default = constant; //# sourceMappingURL=constant.js.map