urlify.js

0.0.1 • Public • Published

urlify.js

urlify.js taken from Django Admin as component module. The original file is here, this is a modified version of the same code with some small enhancements.

Install with component

component install aliem/urlify

the API is simple:

var urlify = require('urlify')

urlify('Foo  bar bAz ');
// 'foo-bar-baz'

The function accepts a second parameter to set the maximum length of the resulting string:

urlify('Foo bar bAz', 5); // 'foo-b'

The library handles different accents for many charsets. Right now it includes:

  • Latin
  • Greek
  • Turkish
  • Russian
  • Ukranian
  • Czech
  • Polish
  • Latvian

In modern ES6 capable javascript engines like v8, all of Unicode is supported.

License

Released under DJango own license, watch LICENSE for more information.

Readme

Keywords

Package Sidebar

Install

npm i urlify.js

Weekly Downloads

0

Version

0.0.1

License

BSD-3-Clause

Last publish

Collaborators

  • aliem