obj-flattener
v1.0.1
Published
Obj Flattener is a framework that aims to flatten a framework to facilitate the use of searches on objects that have a high depth.
Readme
Object Flattener
Object Flattener is a framework that aims to flatten a framework to facilitate the use of searches on objects that have a high depth.
Usage
Using the framework is simple, note:
const obj = {
a: 3,
b: {
a: [1, 2, 3, 4],
d: "hello",
c: {
i: 2 + 2,
},
},
};
flattenObject(obj);output
a: [3, [1, 2, 3, 4]],
b: [{
a: [1, 2, 3, 4],
d: "hello",
c: {
i: 4
}
}],
d: ["hello"],
c: [{
i: 4
}],
i: [4]Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as apropriate!
LICENSE
The license is MIT.
