sqids-javascript
                                
                                 sqids-javascript copied to clipboard
                                
                                    sqids-javascript copied to clipboard
                            
                            
                            
                        chore: QOL improvements
- Move default blocklist to its own file so class Sqidsis visible upon opening
- Export minAlphabetLength,minLengthLimit, andmaxValueso they're available to downstream consumers
- Enforce Required<SqidsOptions>type on defaultOptions
@robhanlon22 Thanks for the PR. Two questions for you:
- Shouldn't newly exported constants be screaming snake case since that's typically the convention for hardcoded values?
- I do like the blocklist moved to a separate file, it's cleaner. Did you check if building the package worked nicely with it being moved? For some reason last time I couldn't get it to package properly.
- Shouldn't newly exported constants be screaming snake case since that's typically the convention for hardcoded values?
Sure, I can do that. I was following the convention of defaultOptions here, but I can change them. I'll also alias defaultOptions to DEFAULT_OPTIONS.
- I do like the blocklist moved to a separate file, it's cleaner. Did you check if building the package worked nicely with it being moved? For some reason last time I couldn't get it to package properly.
Sure, I'll try it out, and see if anything needs tweaking.
@robhanlon22 Cool, thank you.
Regarding naming convention, I always thought this approach was reasonable for JS: https://stackoverflow.com/a/49537197