sort-object-circular
v0.1.1
Published
Sort object keys recursively. Works for circular structures and class instances.
Downloads
8
Readme
Usage guide
This guide is for people who want to use sort-object-circular.
Other guides:
Install
npm install sort-object-circular
Usage
import sortObject from 'sort-object-circular'
sortObject({ b: 1, a: 2 })
// { a: 2, b: 1 }
The function:
- sorts keys recursively,
- clones object prototypes so you can sort class instances and
- works for circular structures.
Thanks
This project uses node-package-skeleton as a starting point for package development.