Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

transliteration

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

transliteration - npm Package Compare versions

Comparing version 0.0.8 to 0.1.0

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc