clairex
v0.1.3
Published
ES6 Stringex
Downloads
7
Readme
Clairex
But really, wtf is this?
- Fun with ES6 modules
- a test suite using Ava
- a test suite using Mocha for the transpiled code
- Fun with method chaining in JavaScript
- A JavaScript/ES6 implementation of Ruby's Stringex library
- using
toUrl()
in my own Yeoman generator generator-clekyll: this was my first inspiration for the project - Another repo/project with an egotistical name :princess: (Claire is the best name)
Usage
In order to make use of this
to enable method chaining, the methods all live within an object called clairex
. This is what is exported and you have access to. To get access to an individual method, e.g. toUrl()
, install the module and call it:
npm i -s clairex // -s adds it to your package.json
Now require it in a script in one of two ways:
var x = require('clairex');
x.clairex.toUrl('Convert this string to a usable URL');
Or:
var x = require('clairex').clairex;
x.toUrl('Convert this string to a usable URL');
Transpile
gulp build
Run the tests
npm test // Ava tests are default
npm run mocha
You don't need to gulp
before running the Ava tests but you do for Mocha ones.
Code of conduct
Here. :star2::couple::sunny: