feature(package) add for-each-key from npm

This commit is contained in:
coderaiser 2018-04-04 18:03:12 +03:00
parent f694857e63
commit 11c249c8f0
5 changed files with 4 additions and 64 deletions

View file

@ -1,11 +0,0 @@
'use strict';
const currify = require('currify/legacy');
const setValue = currify((fn, obj, key) => fn(key, obj[key]));
module.exports = (fn, obj) => {
Object
.keys(obj)
.forEach(setValue(fn, obj));
};