Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Add ability to reset dictionary to default #29

Closed
1 task done
M-Scott-Lassiter opened this issue Apr 30, 2022 · 1 comment
Closed
1 task done
Assignees
Labels
enhancement New feature or request released

Comments

@M-Scott-Lassiter
Copy link
Owner

Contact Details

No response

Description

The class should be able to reset the dictionary to the default value if it has been changed.

const encoder = new AlphanumericEncoder()
console.log(encoder.dictionary) // 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
encoder.dictionary = 'ABCD'
console.log(encoder.dictionary) // 'ABCD'
encoder.resetDefaultDictionary()
console.log(encoder.dictionary) // 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

This should also aid in modularity. The class should have an internal property that tracks the default dictionary and a separate parameter that tracks the dictionary in use. Then in the constructor, this function can be called.

The user can then set the dictionary to anything desired and easily reset it.

Are you able/willing to make the change? (It's ok if you're not!)

Yes

Code of Conduct

@M-Scott-Lassiter M-Scott-Lassiter added the enhancement New feature or request label Apr 30, 2022
@M-Scott-Lassiter M-Scott-Lassiter self-assigned this Apr 30, 2022
github-actions bot pushed a commit that referenced this issue Apr 30, 2022
## [1.2.0](v1.1.1...v1.2.0) (2022-04-30)

### 🐞 Bug Fixes

* add error handling for excessively large integers ([bc725f1](bc725f1)), closes [#28](#28)

### 🏗️ Build Changes

* update dev-dependency subdependencies (routine update) ([d918311](d918311)), closes [#28](#28)

### 🎁 Feature Changes

* add the `resetDefaultDictionary` method ([9166bd8](9166bd8)), closes [#29](#29)

### 🎯 Test Changes

* add applicable test for the `resetDefaultDictionary` method ([a67ef00](a67ef00)), closes [#29](#29)
* add tests to verify errors thrown for excessively large integers ([a9f39d6](a9f39d6)), closes [#28](#28)
@M-Scott-Lassiter
Copy link
Owner Author

🎉 This issue has been resolved in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

No branches or pull requests

1 participant