3.0.0 • Published 3 years ago
ryan-lee-stringlib v3.0.0
String Library Author: Ryan Lee
This is a small library to help manage strings in JavaScript
How to install:
- Open terminal
- Navigate to your project directory
- Run 'npm i ryan-lee-stringlib' in the command line
Code Sample and How to Use:
function capitalize(str) { console.log('---capitalize---'); return str0.toUpperCase() + str.slice(1); } String.prototype.capitalize = function () { return capitalize(this); };
This function takes the string and capitalizes the first letter
To Use: console.log(capitalize('string here')) Outputs: 'Hello world'