each-recursive

1.0.7 • Public • Published

each-recursive

replace foreach with recursion

Install

npm i -s each-recursive

Import

import eachRecursive from "each-recursive";

Use

eachRecursive(["thanks", "all"], (item, index) => console.log(item, index));
// thanks 0, all 1

eachRecursive({ a: 1, b: 2, c: 3 }, (key, value) => console.log(key, value));
// a 1, b 2, c 3

Readme

Keywords

Package Sidebar

Install

npm i each-recursive

Weekly Downloads

0

Version

1.0.7

License

MIT

Unpacked Size

2.66 kB

Total Files

3

Last publish

Collaborators

  • joenix