Sha256: 6f3b47e4539d7e517d35ae9500c842a4acdfb4e7fea34e5c6fcb072dc27dad6a
Contents?: true
Size: 620 Bytes
Versions: 69
Compression:
Stored size: 620 Bytes
Contents
define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { /** * Object every */ function every(obj, callback, thisObj) { callback = makeIterator(callback, thisObj); var result = true; forOwn(obj, function(val, key) { // we consider any falsy values as "false" on purpose so shorthand // syntax can be used to check property existence if (!callback(val, key, obj)) { result = false; return false; // break } }); return result; } return every; });
Version data entries
69 entries across 69 versions & 2 rubygems