Use lodash's forEach

It's a lot faster
main
Aaron Jensen 2015-08-09 23:51:09 -07:00
parent 167760fb24
commit efb669f017
1 changed files with 1 additions and 8 deletions

View File

@ -1,13 +1,6 @@
import update from './update'; import update from './update';
import wrap from './wrap'; import wrap from './wrap';
import forEach from 'lodash/collection/forEach';
function forEach(object, callback) {
if (Array.isArray(object)) {
object.forEach(callback);
} else {
Object.keys(object).forEach((key) => callback(object[key], key));
}
}
function clone(object) { function clone(object) {
if (Array.isArray(object)) { if (Array.isArray(object)) {