
The ultimate JavaScript string library https://vocajs.com

Voca is a JavaScript library for manipulating strings.
The Voca library offers helpful functions to make string manipulations comfortable: change case, trim, pad, slugifly,
latinise, sprintf'y, truncate, escape and much more. The modular design allows to load the entire library, or individual
functions to minimize the application builds. The library is fully tested, well documented and long-term supported.
Features
- Provides the complete set of functions to manipulate, chop, format, escape and query strings
- Includes detailed, easy to read and searchable documentation
- Supports a wide range of environments: Node.js 0.10+, Chrome, Firefox, Safari 7+, Edge 13+, IE 9+
- 100% code coverage
- No dependencies
Documentation
See the complete documentation at https://vocajs.com
Usage
Voca can be used in various environments.
Node.js, Rollup, Browserify
Install the library with npm into your local modules directory:
npm install voca
Then in your application import the entire library:
var v = require('voca');
v.trim(' Hello World! ');
v.sprintf('%s costs $%.2f', 'Coffee', 1.5);
Or individual functions:
var words = require('voca/words');
words('welcome to Earth');
Browser
Load the UMD builds directly into browser's web page:
<script src="voca.js" type="text/javascript"></script>
Then a global variable v
is exposed for the entire library:
<script type="text/javascript">
v.isBlank(' ');
</script>
Bug reports
For bug reports, documentation typos or feature requests feel free to create an issue.
Please make sure that the same problem wasn't reported already.
For general usage questions please ask on StackOverflow.
Contribution
Contribution is welcome!
- Create a pull request containing bug fixes or new features. Include unit tests and keep the code coverage report near 100% 😎
- Propose new functions, improvements, better documentation
Development
Visit the development section to find more details.
Author
Dmitri Pavlutin
License
Licensed under MIT