Skip to content

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

License

Notifications You must be signed in to change notification settings

papasavva/greeklish

Repository files navigation

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

About

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

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published