X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=node_modules%2Fgrunt-legacy-log%2Fnode_modules%2Flodash%2Futility%2Fconstant.js;fp=node_modules%2Fgrunt-legacy-log%2Fnode_modules%2Flodash%2Futility%2Fconstant.js;h=6919b76328206b4a423133b241c797ab1c91916e;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/node_modules/grunt-legacy-log/node_modules/lodash/utility/constant.js b/node_modules/grunt-legacy-log/node_modules/lodash/utility/constant.js new file mode 100644 index 000000000..6919b7632 --- /dev/null +++ b/node_modules/grunt-legacy-log/node_modules/lodash/utility/constant.js @@ -0,0 +1,23 @@ +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @category Utility + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new function. + * @example + * + * var object = { 'user': 'fred' }; + * var getter = _.constant(object); + * + * getter() === object; + * // => true + */ +function constant(value) { + return function() { + return value; + }; +} + +module.exports = constant;