mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
feature(package) add for-each-key from npm
This commit is contained in:
parent
f694857e63
commit
11c249c8f0
5 changed files with 4 additions and 64 deletions
|
|
@ -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));
|
||||
};
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue