Share your code. Components are building blocks, you are the architect.

utils/for-each-obj-indexed
v1.1.0
1.1.0
1.0.0
MIT
PUBLIC
3
Build: fail
BuildFail
Build Status: fail
Iterate over an input `object`, calling a provided function `fn` for each

Please configure Bit as a scoped registry to install components with NPM.Learn more

npm config set '@bit:registry' https://node.bitsrc.io
Use utils/for-each-obj-indexed in your project
npm i @bit/bit.ramda.utils.for-each-obj-indexed
Copied

forEachObjIndexed (fn:Function, obj:Object) : Object

Iterate over an input object, calling a provided function fn for each key and value in the object.

fn receives three argument: (value, key, obj).

Example

var printKeyConcatValue = (value, key) => console.log(key + ':' + value);
     R.forEachObjIndexed(printKeyConcatValue, {x: 1, y: 2}); //=> {x: 1, y: 2}
     // logs x:1
     // logs y:2

Arguments

fn: Function

The function to invoke. Receives three argument, `value`, `key`, `obj`.

obj: Object

The object to iterate over.

Returns

Object

The original object.