get-base-val.js 311 B

1234567891011121314151617
  1. /**
  2. * Module dependencies
  3. */
  4. var coerce = require('./coerce');
  5. var infer = require('./infer');
  6. /**
  7. * A convenience method to return the base value for the given exemplar.
  8. *
  9. * @param {===} exemplar
  10. * @return {*?}
  11. */
  12. module.exports = function getBaseVal(exemplar){
  13. return coerce(infer(exemplar));
  14. };