_baseConforms.js 482 B

123456789101112131415161718
  1. import baseConformsTo from './_baseConformsTo.js';
  2. import keys from './keys.js';
  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. export default baseConforms;