contains.js 251 B

12345678910111213
  1. var some = require('./some');
  2. /**
  3. * Check if object contains value
  4. */
  5. function contains(obj, needle) {
  6. return some(obj, function(val) {
  7. return (val === needle);
  8. });
  9. }
  10. module.exports = contains;