Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heimdallrj/string-prototype
A modified JS `String` Object -- DEPRICATED. Use `js-prototype` instead!
https://github.com/heimdallrj/string-prototype
javascript js
Last synced: 1 day ago
JSON representation
A modified JS `String` Object -- DEPRICATED. Use `js-prototype` instead!
- Host: GitHub
- URL: https://github.com/heimdallrj/string-prototype
- Owner: heimdallrj
- License: mit
- Created: 2017-02-20T06:17:46.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-28T12:44:28.000Z (about 7 years ago)
- Last Synced: 2025-01-11T02:57:57.917Z (4 days ago)
- Topics: javascript, js
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# string-prototype
A modified JS `String.prototype` Object.
## Installation
```
npm install string-prototype
```## Usage
### String.allReplace()
```
import 'string-prototype';var str = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
var list = {
'ipsum': 'REPLACED-ipsum',
'amet': 'REPLACED-amet'
};
var newStr = str.allReplace(list);
console.log(newStr); // Lorem REPLACED-ipsum dolor sit REPLACED-amet, consectetur adipiscing elit.
```### String.toTitleCase()
```
import 'string-prototype';var str = 'Lorem ipsum dolor';
var result = str.toTitleCase();
console.log(result); // Lorem Ipsum Dolor```