long.js
long.js copied to clipboard
Using symbol for isLong
It might be better to use javascript's symbols to validate if an object is long. By using a symbol, we can guarantee that the property indicating if an object is long cannot be accessed(since every symbol is unique).
Makes me wonder how Object.getOwnPropertySymbols changes the equation.
Might be possible, but It is much harder to modify a symbol key.