What you'll learn
In this project we'll use modern JavaScript to refactor and extend a library for manipulating characters that mark the ends of lines in a string.
- Set up a command-line and module interface for the string transformation functions using JavaScript symbols and template tags.
- Refactor JavaScript modules using refactoring variable declarations and strings - we'll use string interpolation and raw string processing.
- Implement custom template tags to allow consumers of our library to quickly transform text.
Table of contents
- Setup your local environment for projects. We'll walk you through everything you need to know to setup your local instance and look around at the code you'll be using for this project.
- In this module, we will refactor JavaScript modules related to the command-line interface of the library. This will involve refactoring variable declarations and strings used for help and usage text. By the end we'll use string interpolation and raw string processing. We'll also use JavaScript Symbols in the main module to provide globally unique values.
- In this module, we'll implement custom template tags to allow consumers of our library to quickly transform text. These tags will also enable consumers to disable line transformations on a given class using a global symbol. By the end we'll demonstrate the use of several string methods by writing tests that ensure our template tags work as expected.
Course FAQ
String manipulation helps developers automate certain parts of working with string values. This particular project will help devs with manipulating characters that mark the ends of lines in a string.
This project is great for Node.js and JavaScript beginners looking to start working with string manipulation functions.
Start with a walkthrough of setting up your environment, learn refactoring variable declarations, string interpolation and raw string processing, and finish by writing test to ensure your template tags work as expected.
This beginner-level project is designed for developers with a basic working knowledge of Node.js and/or JavaScript.