value.js 346 B

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