MCPcopy Index your code
hub / github.com/stemkoski/stemkoski.github.com / constant

Function constant

MathBox/mathbox-bundle.js:40892–40896  ·  view source on GitHub ↗

* Creates a function that returns `value`. * * @static * @memberOf _ * @category Utilities * @param {*} value The value to return from the new function. * @returns {Function} Returns the new function. * @example * * var object = { 'name': 'fred' }; *

(value)

Source from the content-addressed store, hash-verified

40890 * // => true
40891 */
40892 function constant(value) {
40893 return function() {
40894 return value;
40895 };
40896 }
40897
40898 /**
40899 * Produces a callback bound to an optional `thisArg`. If `func` is a property

Callers 2

DataFunction · 0.85
DataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected