Releases: rxpt/str-async-replace
v1.1.1
v1.1.0
- Added the
replaceMany
method, which works similarly to the oldasync-str-replace
package. This method is designed for those who are transitioning from the old package to the new one. - Added new tests for the
replaceMany
method using Jest. - Improved the
README
file with more examples and a better description of each method available in the class.
I am excited to release version 1.1.0 of AsyncReplace. This new version includes the addition of the replaceMany method, which will make the transition from the old async-str-replace
package smoother for those who are switching to str-async-replace
. Additionally, I have reworked the README file to provide more examples and a more detailed explanation of each method in the class.
Thank you for using AsyncReplace and I hope this update makes your development process even smoother!
v1.0.3
A vulnerability issue was fixed due to the use of the Gulp, which exists in the development dependencies. In the package.json file, "overrides" instructions were added to replace vulnerable or outdated packages. It is important to note that these vulnerabilities only occurred during the build process in a development environment.
I apologize for the inconvenience. I will be more careful with future updates.
v1.0.2
- Reorganized the file structure for better accessibility and organization. The main files are now located in the
dist
folder for easier access, while the TypeScript file is located in thesrc
folder. - Upgraded the codebase from JavaScript to TypeScript for better code maintenance.
- Enhanced user-friendliness by recursively awaiting the value of
replaceValue
if it is aPromise
. - Implemented Gulp to automate the use of Browserify and Babel, which makes the code more accessible to a wider range of users. The
index.d.ts
file is now generated by TypeScript, eliminating the need for manual typing. Additionally, a minimized file is now generated using Uglify, improving the code's overall efficiency. - Removed unnecessary lines of code to improve the code's readability.
- Removed the TypeError
replaceValue is a function and its first two parameters are not a string and a number
which is no longer needed. - Removed
.npmignore
sincefiles
is now listed inpackage.json
.
v1.0.1
Changes:
- Improved documentation by adding JSDoc comments to the constructor and methods.
- Improved clarity by changing the parameter name from "str" to "inputString" in the constructor.
- Simplified parameter validation in the constructor by using "==" instead of "===" for null or undefined values.
- Removed unnecessary code that did not affect performance, but was just unnecessary.
- Reorganized parameter validation in the "replace" method for better readability.
- Changed the error message in the "replace" method for when replaceLimit is less than 1: "replaceLimit must be a positive integer greater than zero".
- Updated the index.d.ts file with the correct export declaration.
- Improved the example section in the README to make it more useful.
These changes were made to make the AsyncReplace class easier to use and more performant. I hope it is useful to you.
Please feel free to provide feedback so that I can continue to improve the class.
v1.0.0
This release introduces the initial version of the AsyncReplace class. AsyncReplace is a string manipulation utility that provides an asynchronous replace
method capable of performing string replacement operations using regular expressions or string searches, and a replaceAll
method to replace all occurrences in the string.
The constructor validates the input string, and the replace
method validates the search value, replace value, and replace limit before performing the replacement operation. The replace
method supports a replace limit that can be used to limit the number of replacements.
This version also includes the type definition file (index.d.ts
) and test suite using Jest.
Thank you for trying out the AsyncReplace class!