deepeach

2.1.5 • Public • Published

deepeach

A simple package for recursion of object.

install

npm i deepeach
# or
yarn add deepeach

how to use ?

import deepeach from "deepeach";

let mock = {
  name: "joenix",
  step: 1,
  children: {
    name: "snoopy",
    step: 2,
    children: {
      name: "kitty",
      step: 3
    }
  },
  skills: ["magic", "battleax", "storm"]
};

let result = deepeach(mock, (value, key, path) => {
  console.log(`${key}: ${value}`, path);
});

console.log(result);

Readme

Keywords

none

Package Sidebar

Install

npm i deepeach

Weekly Downloads

3

Version

2.1.5

License

MIT

Unpacked Size

3.7 kB

Total Files

6

Last publish

Collaborators

  • joenix