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

Unicode to ACSII transliteration / slugify module for node.js, browser, Web Worker, ReactNative and CLI.

  • 1.2.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
255K
increased by3.71%
Maintainers
1
Weekly downloads
 
Created

What is transliteration?

The 'transliteration' npm package provides utilities for converting text between different scripts, particularly useful for converting non-Latin scripts to Latin scripts. It supports various transliteration schemes and can handle a wide range of languages.

What are transliteration's main functionalities?

Basic Transliteration

This feature allows you to convert text from non-Latin scripts to Latin scripts. In this example, Chinese characters are transliterated to their Latin equivalents.

const { transliterate } = require('transliteration');
const text = '你好,世界';
const result = transliterate(text);
console.log(result); // Output: 'Ni Hao , Shi Jie'

Slugify

This feature converts text into a URL-friendly slug. It is particularly useful for creating SEO-friendly URLs from non-Latin scripts.

const { slugify } = require('transliteration');
const text = '你好,世界';
const result = slugify(text);
console.log(result); // Output: 'ni-hao-shi-jie'

Custom Transliteration

This feature allows you to define custom mappings for transliteration. In this example, specific Cyrillic characters are mapped to their Latin equivalents.

const { transliterate } = require('transliteration');
const text = 'Привет, мир';
const customMap = { 'и': 'i', 'е': 'e', 'в': 'v' };
const result = transliterate(text, { customMap });
console.log(result); // Output: 'Privet, mir'

Other packages similar to transliteration

Keywords

FAQs

Package last updated on 17 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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