transliteration
Advanced tools
Comparing version 0.0.8 to 0.1.0
{ | ||
"name": "transliteration", | ||
"version": "0.0.8", | ||
"version": "0.1.0", | ||
"description": "Transliteration module for node.js. Transliterate unicode characters into latin characters. Supports all common unicode characters including CJK.", | ||
@@ -5,0 +5,0 @@ "main": "lib/transliteration.js", |
# Transliteration | ||
Transliteration module for node.js. Transliterate unicode characters into latin ones. Supports all common unicode characters including CJK. | ||
Transliteration module for node.js. It can be used to transliterate unicode text into corresponding ascii characters, with support of nearly every commong languages including CJK (Chinese, Japanese and Korean). | ||
@@ -13,5 +13,5 @@ ## Install | ||
### transliteration(str, unknown) | ||
### transliteration(str, [unknown]) | ||
Transliterate `str`. Unknown characters will be converted to `unknown` | ||
Transliterate `str`. Characters which this module cannot recognise will be converted to the `unknown` parameter, defaults to `?`. | ||
@@ -36,3 +36,3 @@ __Example__ | ||
``` | ||
Leave it blank to use the above default values. | ||
If no `options` parameter provided it will use the above default values. | ||
@@ -47,5 +47,21 @@ __Example__ | ||
### Client side usage | ||
Transliteration module can run in browser as well. You can download it using bower: | ||
``` | ||
bower install transliteration | ||
``` | ||
You can also use this module in the browser. Please check example.html for detailed usage. | ||
It can be loaded as AMD / CommonJS component or global variable. | ||
When use in the browser, by default it will create global variables under `window` object: | ||
```javascript | ||
TR('你好, World'); // window.TR | ||
// or | ||
Transliteration('String'); // window.Transliteration | ||
``` | ||
If you don't like the default name or the variable names conflict with other libraries, you can call noConfilict() method before loading other libraries, then both `window.TR` and `window.Transliteration` will be deleted from windows object: | ||
```javascript | ||
var trans = Transliteration.noConflict(); | ||
trans('你好, World'); | ||
trans.slugify('你好, World'); | ||
``` | ||
Please check example.html for a quick demo. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
926753
2515
65