dashify-unicode
Convert a camelcase or space-separated string to a dash-separated string.
a Dashifier for JavaScript that Accepts Unicode Characters ( not just ASCII chars )
It is similar to dashify package, but it can also convert other characters in addition to ASCII chars.
Install
$ npm install dashify --save
Usage
const dashify = ;const dashifyUnicode = ; ;//=> "";//=> "سلام،-خوبی" ;//=> "hello";//=> "hello-دنیا" /*** They are similar in English ***/;//=> 'foo-bar';//=> 'foo-bar-baz';//=> 'foo-bar';//=> 'foo-bar-baz';//=> 'foo-bar-baz-quux' ;//=> 'foo-bar';//=> 'foo-bar-baz';//=> 'foo-bar';//=> 'foo-bar-baz';//=> 'foo-bar-baz-quux'
Thanks to @jonschlinkert