Files
30-seconds-of-code/test/matches/matches.js

3 lines
144 B
JavaScript

const matches = (obj, source) =>
Object.keys(source).every(key => obj.hasOwnProperty(key) && obj[key] === source[key]);
module.exports = matches