Package Exports
- transliteration
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (transliteration) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Transliteration
Transliteration module for node.js. Transliterate unicode characters into latin ones. Supports all common unicode characters including CJK.
Install
npm install transliterationUsage
transliteration(str, unknown)
Transliterate str. Unknown characters will be converted to unknown
Example
var tr = require('transliteration');
tr('你好,世界'); // Ni Hao ,Shi Jie
tr('Γεια σας, τον κόσμο'); // Geia sas, ton kosmo
tr('안녕하세요, 세계'); // annyeonghaseyo, segyeslugify(str, options)
Convert unicode string to slugs. It can be savely used in URL or file name.
You can provide an options parameter in the form of
{
lowercase: true,
separator: '-'
}Leave it blank to use the above default values.
Example
var slugify = require('transliteration').slugify;
slugify('你好,世界'); // ni-hao-shi-jie
slugify('你好,世界', {lowercase: false, separator: '_'}); // Ni_Hao_Shi_JieClient side usage
bower install transliterationYou can also use this module in the browser. Please check example.html for detailed usage.