replace-all-words
v1.1.15
Published
[](https://github.com/HiromiShikata/replace-all-words/actions/workflows/test.yml) [ with another word (afterWord) in the files within the specified target directory. The unique thing is that it preserves the original casing format of the words. So, if your beforeWord is in camelCase, the replaced afterWord will also be in camelCase. Similarly, if the beforeWord is in snake_case, the replaced afterWord will be in snake_case. 🐍
This comes in super handy while:
Refactoring your code: When you need to change a variable or function name across multiple files, use replace-all-words to do it in a snap!
Renaming files: If your project's naming conventions have changed, replace-all-words helps you adapt quickly and consistently.
Example 📖
Here's a quick example to illustrate its usage:
npx replace-all-words ./src/ oldWord newWordIn the above command, replace-all-words will traverse through all the files in the ./src/ directory, replacing every instance of oldWord with newWord, while preserving the casing style. 💼
We hope replace-all-words makes your coding life a bit easier! Feel free to contribute and make it even better. 🙌
Happy coding! 💻🎉
