You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, a new copy of the class has to be instantiated and then the parameters manually set. For example:
// Import into a projectconstAlphanumericEncoder=require('alphanumeric-encoder')constencoder=newAlphanumericEncoder()encoder.allowLowerCaseDictionary=trueencoder.dictionary='abcdEFGH'
I would like the ability to simplify this by allowing the user to pass a configuration object like this:
// Import into a projectconstAlphanumericEncoder=require('alphanumeric-encoder')constencoder=newAlphanumericEncoder({allowLowerCaseDictionary: true,dictionary: "abcdEFGH"})
Both of these should be optional parameters with either one or the other passed. When processing, the allowLowerCaseDictionary term should be checked first followed by setting the dictionary.
Associated tests need to be added as well to keep coverage at 100%.
Are you able/willing to make the change? (It's ok if you're not!)
## [1.4.0](v1.3.0...v1.4.0) (2022-05-02)
### 🎁 Feature Changes
* add ability to instantiate the class using an optional config object in the constructor ([8dc230b](8dc230b)), closes [#35](#35)
### 🎯 Test Changes
* add tests verifying the optional config object works as expected ([f7f7de6](f7f7de6)), closes [#35](#35)
Contact Details
No response
Description
Right now, a new copy of the class has to be instantiated and then the parameters manually set. For example:
I would like the ability to simplify this by allowing the user to pass a configuration object like this:
Both of these should be optional parameters with either one or the other passed. When processing, the
allowLowerCaseDictionary
term should be checked first followed by setting the dictionary.Associated tests need to be added as well to keep coverage at 100%.
Are you able/willing to make the change? (It's ok if you're not!)
Yes
Code of Conduct
The text was updated successfully, but these errors were encountered: