X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=node_modules%2Fgrunt-legacy-util%2Fnode_modules%2Flodash%2Fconstant.js;fp=node_modules%2Fgrunt-legacy-util%2Fnode_modules%2Flodash%2Fconstant.js;h=584480451a77220db58b088a64e2bd042aa0fc44;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/node_modules/grunt-legacy-util/node_modules/lodash/constant.js b/node_modules/grunt-legacy-util/node_modules/lodash/constant.js new file mode 100644 index 000000000..584480451 --- /dev/null +++ b/node_modules/grunt-legacy-util/node_modules/lodash/constant.js @@ -0,0 +1,23 @@ +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @category Util + * @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;