constant.js 203 B

123456789101112
  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. });