constant.js 203 B

12345678910111213
  1. define(function () {
  2. // Predicate-generating function. Often useful outside of Underscore.
  3. function constant(value) {
  4. return function() {
  5. return value;
  6. };
  7. }
  8. return constant;
  9. });