Skip to content

Commit

Permalink
Add JSON storage limit utilities (#14)
Browse files Browse the repository at this point in the history
* Add JSON storage limit utilities

* Add handling for string length depending on encoding

* Add handling for number sizes

* Refactor code and add more tests

* Add functional code improvements and tests

* Add edge case handling and more complex tests

* Refactor code, change approaches and improve tests

* Minor code refactoring and additional test

* Add one more unit test

* Refactor tests and test data

* Add skip feature for JSON size calculation

* Add algorithm improvements and new test data

* Minor refactoring of calculateStringSize function

* Minor refactoring of isASCII function

* Minor refactoring of skip sizing feature

* Add unit tests for circular structures

* Add test improvement with escape characters

* Code refactoring

* Code refactoring & improvements

* Small code refactoring (review answer)

* Another minor code refactoring (review answer)

* Remove useless comment

* Add more tests for serialization checks of functions and symbols

* Add specific approach for handling Date objects

* Add ECMA TC39 (test262) test scenarios and improve algorithm

* Add another batch of ECMA TC39 (test262) test scenarios

* Fix types in tests

* Add optimized check for circular structures

* Change approach for circular object detection

* Improve circular object detection

* Improve Date object sizing

* Change type-check approach (if-else)

* Add explanation comments for circular structure detection and improve tests
  • Loading branch information
david0xd authored Jul 12, 2022
1 parent 3902379 commit aeb62e7
Show file tree
Hide file tree
Showing 5 changed files with 1,027 additions and 1 deletion.
Loading

0 comments on commit aeb62e7

Please sign in to comment.