to-id

2.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i to-id

Weekly Downloads

18

Version

2.0.0

License

MIT

Unpacked Size

8.73 kB

Total Files

9

Last publish

Collaborators

  • gr2m