greeklish

1.0.2 • Public • Published

greeklish

Build Status codecov npm npm NPM

A tool to convert Greeklish to Greek and vice versa with small size and zero dependencies.

Greeklish, a combination of the words Greek and English is the Greek language written using the Latin alphabet.

It is commonly use in texting to write faster and hide grammar mistakes among Greeks.

Usage:

const gl = require('greeklish')

Functions

  • toGreeklish()
  • toGreek()

Examples

const gl = require('greeklish')
 
const greeklishText = gl.toGreeklish('Βελτιωμένος σήμερα ο καιρός.')
// Beltiwmenos shmera o kairos.
 
const greekText = gl.toGreek('Βeltiwmenos shmera o kairos.')
// Βελτιωμενος σημερα ο καιρος.

Validation

Both functions expect a string with atleast length of 1. Make sure you pass a valid string, otherwise the functions will throw an error.

const gl = require('greeklish')
 
const greeklishText = gl.toGreeklish(1)
// Error: Value must be a string with at least one character.
 
const greekText = gl.toGreek('')
// Error: Value must be a string with at least one character.

Tests

Clone the repo, npm install, and run npm test

Package Sidebar

Install

npm i greeklish

Weekly Downloads

7

Version

1.0.2

License

MIT

Unpacked Size

21.2 kB

Total Files

14

Last publish

Collaborators

  • papasavva