clairex
ES6 Stringex
Last updated 4 years ago by claireparker .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install clairex 
SYNC missed versions from official npm registry.

Clairex

NPM version Build Status Dependency Status Coverage percentage

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:

License

MIT © Claire Parker

Current Tags

  • 0.1.3                                ...           latest (4 years ago)

6 Versions

  • 0.1.3                                ...           4 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
  • 0.0.3                                ...           4 years ago
  • 0.0.2                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (15)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |