Create a String Manipulation Library in JavaScript

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.

  1. Set up a command-line and module interface for the string transformation functions using JavaScript symbols and template tags.
  2. Refactor JavaScript modules using refactoring variable declarations and strings - we'll use string interpolation and raw string processing.
  3. Implement custom template tags to allow consumers of our library to quickly transform text.

Table of contents

Setup
15m
  • 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.
Refactoring the Library
30m
  • 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.
Implementing Template Tags
30m
  • 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

What is string manipulation in JavaScript?
Who is this project for?
What will I learn in this project?
What prerequisites do I need?

About the author

AJ is a software developer who is passionate about technical education. He loves creating with code and volunteering with youth robotics programs.

Ready to upskill? Get started