@amecake/string-toolkit
v1.1.0
Published
In this exercise, you will create a small, useful JavaScript library that provides string manipulation functions and publish it to npm. This project is designed to help you learn how to structure a library, write tests and documentation, and share your wo
Readme
PROJECT DESCRIPTION
In this exercise, you will create a small, useful JavaScript library that provides string manipulation functions and publish it to npm. This project is designed to help you learn how to structure a library, write tests and documentation, and share your work with the community.
INSTALLATION INSTRUCTIONS
1) Install library string-toolkit
npm: "npm install string-toolkit"
yarn: "yarn add string-toolkit"
2) Install Jest for JavaScript
npm: "npm install --save-dev jest"
yarn: "yarn add --dev jest"
DETAILED USAGE EXAMPLE
toSnakeCase
Converts the string into snake case (lower case with underscores)
Example: Input: "Hello World" -> Output: "hello_world"
In code: console.log(toSnakeCase("Hello World")); Output: "hello_world"
Example: Input: "This is a Test" -> Output: "this_is_a_test"
In code: console.log(toSnakeCase("This is a Test")); Output: "this_is_a_test"
toKebabCase
Converts the string into kebab case (lower case with dashes)
Example: Input: "Hello World" -> Output: "hello-world"
In code: console.log(toKebabCase("Hello World")); Output: "hello-world"
Example: Input: "This is a Test" -> Output: "this-is-a-test"
In code: console.log(toKebabCase("This is a Test")); Output: "this-is-a-test"
