Created
April 20, 2018 07:53
-
-
Save hrdtbs/e6e22aea31c10c471769dcd44c674f7f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const each = (object, callback) => { | |
for (key in object) { | |
const val = object[key]; | |
if (callback.call(val, key, val) === false) { | |
break; | |
} | |
} | |
return object; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment