Closed bendytree closed 1 year ago
Sorry, these extra checks don’t fit in an idea of nano-library.
Maybe we can do it by types?
Doesn't really make me any difference if the check is added; I just thought it'd be helpful for others. Fwiw - I opened the C# and Swift versions to see what they do. C# throws if letters is empty. Swift won't hang because it doesn't use a while(true)
loop.
If you know how to add it by types, please send PR.
Unfortunately, JS code for check we can’t add because it will bloat the JS footprint of this nano library (and will help for a very small part of users)
My code had the following bug which hung the server:
Took a bit to find the issue. If
letters
is null or empty, might be a good spot to throw an error.