UNPKG

d3plus-common

Version:

Common functions and methods used across D3plus modules.

18 lines (17 loc) 438 B
/** @function constant @desc Wraps non-function variables in a simple return function. @param {Array|Number|Object|String} value The value to be returned from the function. @example <caption>this</caption> constant(42); @example <caption>returns this</caption> function() { return 42; } */ export default function(value) { return function constant() { return value; }; } //# sourceMappingURL=constant.js.map