| /** |
| * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> |
| * Build: `lodash modularize modern exports="node" -o ./modern/` |
| * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> |
| * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> |
| * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors |
| * Available under MIT license <http://lodash.com/license> |
| */ |
| |
| /** |
| * 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' }; |
| * var getter = _.constant(object); |
| * getter() === object; |
| * // => true |
| */ |
| function constant(value) { |
| return function() { |
| return value; |
| }; |
| } |
| |
| module.exports = constant; |