String Library Project
For FEW 2.1 (Advanced Javascript) at Make School. Assignment #1. v1.2.4
Built with Javascript ES6 (Vanilla)
https://www.npmjs.com/package/@chrisle26/homework-1-strings
A library of reusable code that operates on strings. Strings are one of the most common data types to work with. These functions solve the problems below:
- capitalize() makes the first character of a given string Uppercase.
- allCaps() makes all characters in a string UPPERCASE.
- capitalizeWords() Capitalizes The First Letter Of Each Word in a string.
- removeExtraSpaces() removes any --extra spaces and whitespace-- in a string.
- kebobCase() converts a string to kebob-case and sets the string to lowercase. Any seperator can be added as a second parameter.
- snakeCase() converts a string to snake_case and sets the string to lowercase.
- camelCase() converts a string to camelCase.
- shiftChar() takes the first letter of a string and moves it to the end of a string.
- makeHashTag() converts a string into a #HashTagString with a maximum of 3 words and capitalizes each word.
- isEmpty() returns true if the string only contains whitespace.
Run
$ node src/index to run program in console
Updates
- Added prototype methods
- Published to NPM
- Updated to Readme (Badges, Version, Function Names & NPM package link)
- Added unit test with 'Jest' Library