Giter Club home page Giter Club logo

younger-futhark's Introduction

Younger Futhark

Transform latin letters to Younger Futhark runes & vice versa

Other runic alphabets:

Install

yarn add younger-futhark

Usage

You can either transform runes to text, or text to runes.

Latin text to runes:

import { lettersToRunes } from 'younger-futhark'

// Old Norse text from Old Groms runestone.
const result = lettersToRunes('auk tani karþi kristna')

console.log(result) // ᛅᚢᚴ ᛏᛅᚾᛁ ᚴᛅᚱᚦᛁ ᚴᚱᛁᛋᛏᚾᛅ

Runes to latin text:

import { runesToLetters } from 'younger-futhark'

const result = runesToLetters('ᚠᚢᚦᛅᚱᚴ')

console.log(result) // fuþark

Style variants:

Younger Futhark contains two rune sets: long branch (danish) and short twig (Norwegian / Swedish)

import youngerFuthark from 'younger-futhark';

const letters = "aábcdðeéfghiíjklmnoópqrstþuúvwxyýzåäæöøǫþ";

// Comes with named functions per style.
const longBranch = youngerFuthark.lettersToLongBranchRunes(letters);
const shortTwig = youngerFuthark.lettersToShortTwigRunes(letters);

console.log(longBranch); // ᛅᛅᛒᛋᛏᚦᛁᛁᚠᚴᚼᛁᛁᛁᚴᛚᛘᚾᚢᚢᛒᚴᚱᛋᛏᚦᚢᚢᚢᚢᛋᚢᚢᛋᚢᛅᛅᚢᚢᚢᚦ
console.log(shortTwig);  // ᛆᛆᛒᛌᛐᚦᛁᛁᚠᚴᚽᛁᛁᛁᚴᛚᛘᚿᚢᚢᛒᚴᚱᛌᛐᚦᚢᚢᚢᚢᛌᚢᚢᛌᚢᛆᛆᚢᚢᚢᚦ

// Default function can also be called with variant enum to define the runeset.
const longBranchResult = youngerFuthark.lettersToRunes(letters, youngerFuthark.Variant.longBranch)
const shortTwigResult = youngerFuthark.lettersToRunes(letters, youngerFuthark.Variant.shortTwig)

About Younger Futhark

The Younger Futhark, also called Scandinavian runes, is a runic alphabet and a reduced form of the Elder Futhark, with only 16 characters. It was in use from about the 9th century onwards.

younger-futhark's People

Watchers

 avatar  avatar

younger-futhark's Issues

Add short twig runes to lettersToRunes

Currently always transcribes text to long twig runes. Note: runes to text does transform short twigs too, does not need edits.

  • Offer separate functions for separate rune sets.
  • Alter current exported method to accept rune dialect, which defaults to current long branch. Keeps backwards compatibility.

Long branch & short twig: separate rune maps

For transforming purposes one map works well. For iterating through runes of given set, another approach is needed

  • Break rune maps into separate maps for long twig & short branch.
  • Offer combination of them for backwards compatibility reasons
  • Export new ones for iteration needs, eg. runes.vercel.app

Add staveless futhark

Staveless futhark is also considered variant of younger futhark. When adding other variants, add this one too

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.