File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 22[ ![ Build Status] ( https://travis-ci.org/DawnImpulse/json-keys-sort.svg?branch=master )] ( https://travis-ci.org/DawnImpulse/json-keys-sort ) ![ wait-loop] ( https://img.shields.io/npm/dt/json-keys-sort.svg )
33 > Sorting a json object based on keys either ascending or descending & even recursively
44
5- ### Latest Changes
6- - ` v1.3.0 `
7- - Added support for Typescript
8- ### Example -
5+ ### Latest Changes
6+ - Added support for Typescript
7+ ### Example -
98> Note : focus on ** keys** not values
109
1110~~~~
@@ -48,12 +47,14 @@ Output will be -
4847 - data : the json object to sort
4948 - sort :
5049 - true (default) : ascending sort , since it is default you can only call ` json.sort(data) `
51- - false : descending sort
50+ - false : descending sort
5251> Note : the function assumes that you always provide a json object
5352
5453+ The function work recursively and sort all the inner json objects too.
5554
5655### Versions
56+ + ` v1.3.1 `
57+ + Bug Fix : Fixed type of parameter in sort function from JSON to object
5758
5859+ ` v1.3.0 `
5960 + Included support for typescript (added declaration file)
@@ -75,9 +76,10 @@ Output will be -
7576
7677### Contact
7778
78- + Twitter - [ @dawnimpulse ] ( https://twitter.com/dawnimpulse )
79+ + Twitter - [ @dawnimpulse ] ( https://twitter.com/dawnimpulse )
7980+ Email - [ dawnimpulse@gmail.com ] ( mailto:dawnimpulse@gmail.com )
8081
82+
8183
8284### License (ISC)
8385~~~~
Original file line number Diff line number Diff line change 1- export declare function sort ( data : JSON , sort : boolean ) : JSON ;
1+ export declare function sort ( data : object , sort : boolean ) : object ;
22
3- export declare function sort ( data : JSON ) : JSON ;
3+ export declare function sort ( data : object ) : object ;
Original file line number Diff line number Diff line change 11{
22 "name" : " json-keys-sort" ,
3- "version" : " 1.3.0 " ,
3+ "version" : " 1.3.1 " ,
44 "description" : " Sorting a json object based on keys either ascending or descending & even recursively" ,
55 "main" : " index.js" ,
66 "types" : " index.d.ts" ,
You can’t perform that action at this time.
0 commit comments