_baseConforms.js 484 B

12345678910111213141516171819
  1. var baseConformsTo = require('./_baseConformsTo'),
  2. keys = require('./keys');
  3. /**
  4. * The base implementation of `_.conforms` which doesn't clone `source`.
  5. *
  6. * @private
  7. * @param {Object} source The object of property predicates to conform to.
  8. * @returns {Function} Returns the new spec function.
  9. */
  10. function baseConforms(source) {
  11. var props = keys(source);
  12. return function(object) {
  13. return baseConformsTo(object, source, props);
  14. };
  15. }
  16. module.exports = baseConforms;