We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey, I've spotted that when you use sorting on object which has values like Date, Set etc. they are vanished (they are set to {} - empty object)
Simple reproduction
const obj = { a: 1, b: 2, c: new Date(), d: [ { a: 1, c: 3, b: 2, z: 26, set: new Set([1, 2, 3]), date: { from: new Date(), to: new Date(), }, }, ], } const sortedObj = sortObject(obj);
result:
{ "a": 1, "b": 2, "c": {}, "d": [ { "a": 1, "b": 2, "c": 3, "date": { "from": {}, "to": {} }, "set": {}, "z": 26 } ] }
expected result:
{ a: 1, b: 2, c: 2024-04-22T15:13:16.020Z, d: [ { a: 1, b: 2, c: 3, date: { from: 2024-04-22T15:13:16.020Z, to: 2024-04-22T15:13:16.020Z }, set: Set(3) { 1, 2, 3 }, z: 26 } ] }
I'm not sure if this is a bug or feature but I'll open a PR soon for this and leave it up to you to decide whether to merge this :)
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Hey, I've spotted that when you use sorting on object which has values like Date, Set etc. they are vanished (they are set to {} - empty object)
Simple reproduction
result:
expected result:
I'm not sure if this is a bug or feature but I'll open a PR soon for this and leave it up to you to decide whether to merge this :)
The text was updated successfully, but these errors were encountered: