Closed marvelsrp closed 7 years ago
@marvelsrp please add short examaple how to use eachKeys in PR descr.
@tuchk4 Example
import rmk from 'rmk';
let formula = rmk(rmk.each((key, value) => {
return {key: key + '_', value: value * 2}
})
let data = {a:1, b: 2, c: 3, d: 4}
formula(data)
// or
rmk.clear()(data)
// => {a_: 2, b_: 4, c_: 6, d_: 8}
I thought to use {[key]: value}
. But it is slower:
let key = Object(t).keys[0];
result[key] = t[key];
than
result[t.key] = t.value;
2.2.1 (May 18, 2017)
Actions
Flow