sylvaincombes / ju-string

Simple utility for the String javascript object

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ju-string

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.

Status

Build Status Sauce Test Status Coverage Status

Sauce Test Status

Dependency Status

What it is

It's a simple string utility to make the everyday job easier.

Why another lib

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 ...

How to start

In browser

  1. In your html page include the javascript :

     <script type="text/javascript" src="../build/ju/string.min.js"></script>
    
  2. You're ready, start using with for example :

     ju.string.trim('   my value    ');
    

In nodejs

  1. Install with npm

     npm install ju-string
    
  2. Use it in your code

     var s = require('ju-string');
     s.trim('   my value    ');
    

About

Simple utility for the String javascript object

License:MIT License


Languages

Language:JavaScript 100.0%