2.0.0 • Published 5 years ago

to-id v2.0.0

Weekly downloads
88
License
MIT
Repository
github
Last release
5 years ago

to-id

Normalises strings for comparison or usage as IDs

Build Status Coverage Status Greenkeeper badge

Usage

toId('Inside a $34 smartphone') // inside-a-34-smartphone
toId('Kore: a fast web server') // kore-a-fast-webserver
toId(' L. (YC S15) - Is Hiring ') // l-yc-s15-is-hiring
toId('안_형_준') // 안-형-준

Installation

You can download to-id.js and add it to your site using <script src="to-id.js"></script>

Or install using bower for usage in browser:

bower install --save to-id

Install using npm for node.js or browserify:

npm install --save to-id

Test

npm test

Tests are run with testmate. In order to run them in a browser or through saucelabs, set TEST_CLIENT accordingly, for example

TEST_CLIENT=selenium:firefox npm test