value.js 379 B

12345678910111213
  1. define(function () {
  2. // Extract the result from a wrapped (and possibly chained) object.
  3. // This function is also aliased as `valueOf` and `toJSON`, which provide
  4. // unwrapping proxies for some methods used in engine operations such as
  5. // arithmetic and JSON stringification.
  6. function value(wrapper) {
  7. return wrapper._wrapped || wrapper;
  8. }
  9. return value;
  10. });