Simple utility for the String javascript object
This can be used standalone too, in browser or with nodejs.
It is part of the ju (Javascript Utilities) collection.
It's a simple string utility to make the everyday job easier.
- Open source, MIT Licence
- no dependency, can be used standalone
- doesn't pollute the native javascript String object
- usable in browser or with nodejs
- made with browserify
- build with grunt
- unit tested with tape and saucelabs
- simple examples provided in the examples folder
- api doc made with jsdoc see doc
I know there are already a gazillion of open source javascript libraries out there, so why another one again ?
Because I want these :
- decoupled in small components
- simple, limited to what I found useful (purely subjective)
- standalone when possible
- usable in browsers and nodejs
- choice of my own naming, knowledge of internals ...
And I wanted to play and learn with some toys too like build system, testing, ci, npm ...
-
In your html page include the javascript :
<script type="text/javascript" src="../build/ju/string.min.js"></script>
-
You're ready, start using with for example :
ju.string.trim(' my value ');
-
Install with npm
npm install ju-string
-
Use it in your code
var s = require('ju-string'); s.trim(' my value ');