objectology
v0.0.5
Published
Powerful library for inspecting JS objects
Downloads
2
Readme
Objectology
n. The study of objects.
This is a "low-level" JavaScript library for inspecting and modifying objects. It contains functions for retrieving the prototypes and constructors of objects, giving them string names, enumerating their keys, modifying property descriptors, and more.
These are generally more powerful or complex than standard functions like Object.keys
and Object.getOwnPropertyNames
.
More advanced functionality can include:
- Replicate an object both structurally and behaviorally
- Flattening objects with complex prototype chains.
- Creating functions with specific characteristics, such as a custom name.
- Calling a function in a special way (e.g. with
new
). - Determining the special declaration characteristics of a function, such as whether it is an arrow function or an async function.