I changed the algorithm to use the fact that object keys come in the order of creation.
Instead of concatinating strings I just sort the properties of objects and to JSON.stringify over the whole result.
Also replaced Object.keys with Object.getOwnPropertyNames since it seems faster.
All tests are green and performance is better and at times faster than fast-stable-stringify.
Code is also smaller.
Is this of interest and should I make a pull request?
I changed the algorithm to use the fact that object keys come in the order of creation. Instead of concatinating strings I just sort the properties of objects and to JSON.stringify over the whole result. Also replaced Object.keys with Object.getOwnPropertyNames since it seems faster. All tests are green and performance is better and at times faster than fast-stable-stringify. Code is also smaller.
Is this of interest and should I make a pull request?