1
0
mirror of https://github.com/garraflavatra/alphabets.git synced 2025-01-18 21:27:58 +00:00

Add Scandinavian alphabets

This commit is contained in:
Romein van Buren 2021-05-24 15:01:04 +02:00
parent 04af1db9d3
commit 2c77825857
4 changed files with 35 additions and 27 deletions

View File

@ -2,7 +2,7 @@
[![CI](https://github.com/garraflavatra/alphabets/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/garraflavatra/alphabets/actions/workflows/test.yml) [![CI](https://github.com/garraflavatra/alphabets/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/garraflavatra/alphabets/actions/workflows/test.yml)
A tiny JS dependency (<800 bytes!) which exports many alphabets for many use A tiny JS dependency (<2kb!) which exports many alphabets for many use
cases. cases.
More information is available in the More information is available in the
@ -78,6 +78,11 @@ Usage: see [Usage](#usage).
| Name | Export name | | Name | Export name |
|------|-------------| |------|-------------|
| Latin | `latin` | | Danish | `danish` |
| Faroese | `faroese` |
| Greek (modern) | `greek` | | Greek (modern) | `greek` |
| Greek (ancient/polytonic) | `greekPolytonic` | | Greek (ancient/polytonic) | `greekPolytonic` |
| Icelandic | `icelandic` |
| Latin | `latin` |
| Norwegian | `norwegian` |
| Swedish | `swedish` |

View File

@ -2,7 +2,7 @@
title: Alphabets title: Alphabets
--- ---
A tiny JS dependency (<800 bytes!) which exports many alphabets for many use A tiny JS dependency (<2kb!) which exports many alphabets for many use
cases. cases.
[![CI](https://github.com/garraflavatra/alphabets/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/garraflavatra/alphabets/actions/workflows/test.yml) [![CI](https://github.com/garraflavatra/alphabets/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/garraflavatra/alphabets/actions/workflows/test.yml)
@ -123,6 +123,11 @@ Usage: see [Usage](#usage).
| Name | Export name | | Name | Export name |
|------|-------------| |------|-------------|
| Latin | `latin` | | Danish | `danish` |
| Faroese | `faroese` |
| Greek (modern) | `greek` | | Greek (modern) | `greek` |
| Greek (ancient/polytonic) | `greekPolytonic` | | Greek (ancient/polytonic) | `greekPolytonic` |
| Icelandic | `icelandic` |
| Latin | `latin` |
| Norwegian | `norwegian` |
| Swedish | `swedish` |

View File

@ -1,16 +1,10 @@
// These tests are just samples and not every alphabet is tested (that's boring).
const alphabets = require("../dist/bundle.js"); const alphabets = require("../dist/bundle.js");
const latin = [ const greek = ["α", "β", "γ", "δ", "ε", "ζ", "η", "θ", "ι", "κ", "λ", "μ", "ν", "ξ", "ο", "π", "ρ", "σ", "τ", "υ", "φ", "χ", "ψ", "ω"];
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" const greekPolytonic = ["α", "β", "γ", "δ", "ε", "ζ", "η", "θ", "ι", "κ", "λ", "μ", "ν", "ξ", "ο", "π", "ρ", "σ", "τ", "υ", "φ", "χ", "ψ", "ω"];
]; const latin = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"];
const greek = [
"α", "β", "γ", "δ", "ε", "ζ", "η", "θ", "ι", "κ", "λ", "μ", "ν", "ξ", "ο", "π", "ρ", "σ", "τ", "υ", "φ", "χ", "ψ", "ω"
];
const greekPolytonic = [
"α", "β", "γ", "δ", "ε", "ζ", "η", "θ", "ι", "κ", "λ", "μ", "ν", "ξ", "ο", "π", "ρ", "σ", "τ", "υ", "φ", "χ", "ψ", "ω"
];
test('alphabets.latin should return Latin alphabet', () => { test('alphabets.latin should return Latin alphabet', () => {
expect(alphabets.latin).toStrictEqual(latin); expect(alphabets.latin).toStrictEqual(latin);

View File

@ -1,17 +1,21 @@
export const latin = [ export const danish = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'æ', 'ø', 'å'];
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" export const elfadian = ['a', 'ą', 'b', 'd', 'ð', 'e', 'ę', 'f', 'g', 'h', 'i', 'į', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'r', 's', 't', 'u', 'ų', 'v', 'w', 'y', 'y̨', 'å', 'ą̊', 'ä', 'ö'];
]; export const faroese = ['a', 'á', 'b', 'd', 'ð', 'e', 'f', 'g', 'h', 'i', 'í', 'j', 'k', 'l', 'm', 'n', 'o', 'ó', 'p', 'r', 's', 't', 'u', 'ú', 'v', 'y', 'ý', 'æ', 'ø'];
export const greek = ["α", "β", "γ", "δ", "ε", "ζ", "η", "θ", "ι", "κ", "λ", "μ", "ν", "ξ", "ο", "π", "ρ", "σ", "τ", "υ", "φ", "χ", "ψ", "ω"];
export const greek = [ export const greekPolytonic = ["α", "β", "γ", "δ", "ε", "ζ", "η", "θ", "ι", "κ", "λ", "μ", "ν", "ξ", "ο", "π", "ρ", "σ", "τ", "υ", "φ", "χ", "ψ", "ω"];
"α", "β", "γ", "δ", "ε", "ζ", "η", "θ", "ι", "κ", "λ", "μ", "ν", "ξ", "ο", "π", "ρ", "σ", "τ", "υ", "φ", "χ", "ψ", "ω" export const icelandic = ['a', 'á', 'b', 'd', 'ð', 'e', 'é', 'f', 'g', 'h', 'i', 'í', 'j', 'k', 'l', 'm', 'n', 'o', 'ó', 'p', 'r', 's', 't', 'u', 'ú', 'v', 'x', 'y', 'ý', 'þ', 'æ', 'ö'];
]; export const latin = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"];
export const norwegian = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'æ', 'ø', 'å'];
export const greekPolytonic = [ export const swedish = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'å', 'ä', 'ö'];
"α", "β", "γ", "δ", "ε", "ζ", "η", "θ", "ι", "κ", "λ", "μ", "ν", "ξ", "ο", "π", "ρ", "σ", "τ", "υ", "φ", "χ", "ψ", "ω"
];
export default [ export default [
latin, danish,
elfadian,
faroese,
greek, greek,
greekPolytonic, greekPolytonic,
icelandic,
latin,
norwegian,
swedish,
]; ];