Giter Site home page Giter Site logo

stscoundrel / north-germanic-alphabets Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 81 KB

North Germanic (modern) alphabet constants for JS.

License: MIT License

JavaScript 100.00%
alphabet danish-language norwegian-language swedish-language elfdalian-language icelandic-language faroese-language javascript nodejs

north-germanic-alphabets's Introduction

North Germanic Alphabets

North Germanic (modern) alphabet constants for JS. Danish, Faroese, Elfdalian, Icelandic, Norwegian and Swedish.

Motivation

While all north germanic languages use very similar set of sounds, they tend to use different letters to write them. For example Ø vs Ö, Æ vs Ä and the question of more medieval letters like Ð and þ. Simply put, I'd rather not copy-paste and format these any more.

Install

yarn add north-germanic-alphabets

Usage

The module offers three array exports per language: lower case, upper case and combination of both.

const {
  DANISH_AND_NORWEGIAN,
  ELFDALIAN,
  FAROESE,
  ICELANDIC,
  SWEDISH,
} = require('north-germanic-alphabets')

const { LOWER_CASE, UPPER_CASE, ALPHABET } = ICELANDIC

console.log(LOWER_CASE)
// ['a', 'á', 'b', 'd', 'ð', 'e', 'é', 'f', 'g', 'h', 'i', 'í', 'j', 'k', 'l', 'm', 'n', 'o', 'ó', 'p', 'r', 's', 't', 'u', 'ú', 'v', 'x', 'y', 'ý', 'þ', 'æ', 'ö']

console.log(UPPER_CASE)
// ['A', 'Á', 'B', 'D', 'Ð', 'E', 'É', 'F', 'G', 'H', 'I', 'Í', 'J', 'K', 'L', 'M', 'N', 'O', 'Ó', 'P', 'R', 'S', 'T', 'U', 'Ú', 'V', 'X', 'Y', 'Ý', 'Þ', 'Æ', 'Ö']


console.log(ALPHABET) // combined upper & lower case.

As Danish and Norwegian share the same alphabet, they are shipped both as common and separate imports.

const {
  DANISH_AND_NORWEGIAN,
  DANISH,
  NORWEGIAN
} = require('north-germanic-alphabets')

// They are all the same thing. Up to your preference which to import.

NORWEGIAN.LOWER_CASE.forEach(letter => console.log(letter))

north-germanic-alphabets's People

Contributors

stscoundrel avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.