objectEach.js 261 B

12345678910111213
  1. var hasOwnProp = require('./hasOwnProp')
  2. function objectEach (obj, iterate, context) {
  3. if (obj) {
  4. for (var key in obj) {
  5. if (hasOwnProp(obj, key)) {
  6. iterate.call(context, obj[key], key, obj)
  7. }
  8. }
  9. }
  10. }
  11. module.exports = objectEach