Hello, World! I'm jzombie, a passionate software developer with a knack for problem-solving and a love for open-source. I believe in the power of code to change the world and make our lives easier.
Hello, World! I'm jzombie, a passionate software developer with a knack for problem-solving and a love for open-source. I believe in the power of code to change the world and make our lives easier.
You could add unit tests.
--- some opinions below
Second to that, you might gain performance benefit if you use Map (developer.mozilla.org/en-US/docs/W...) instead of your class.
You could still keep the API the same while having a more "native" backend w/ the Map usage.
If you do retain the class usage, I'd useJS classes, as it can be more easily extended with other functionality in the future.
You can also extend the "native" Map type (i.e. class StructMap extends Map) with a custom class for your needs.
If doing that, I'd highly recommend TypeScript because it will help you avoid returning the wrong types in your methods.