diff --git a/README.md b/README.md index 6bb019b..019a5e7 100644 --- a/README.md +++ b/README.md @@ -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) -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. More information is available in the @@ -78,6 +78,11 @@ Usage: see [Usage](#usage). | Name | Export name | |------|-------------| -| Latin | `latin` | +| Danish | `danish` | +| Faroese | `faroese` | | Greek (modern) | `greek` | | Greek (ancient/polytonic) | `greekPolytonic` | +| Icelandic | `icelandic` | +| Latin | `latin` | +| Norwegian | `norwegian` | +| Swedish | `swedish` | diff --git a/docs/index.md b/docs/index.md index eb91af1..a51d7a1 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,7 +2,7 @@ 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. [![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 | |------|-------------| -| Latin | `latin` | +| Danish | `danish` | +| Faroese | `faroese` | | Greek (modern) | `greek` | | Greek (ancient/polytonic) | `greekPolytonic` | +| Icelandic | `icelandic` | +| Latin | `latin` | +| Norwegian | `norwegian` | +| Swedish | `swedish` | diff --git a/src/bundle.test.js b/src/bundle.test.js index c0d9a3d..292a9c5 100644 --- a/src/bundle.test.js +++ b/src/bundle.test.js @@ -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 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 = [ - "α", "β", "γ", "δ", "ε", "ζ", "η", "θ", "ι", "κ", "λ", "μ", "ν", "ξ", "ο", "π", "ρ", "σ", "τ", "υ", "φ", "χ", "ψ", "ω" -]; +const greek = ["α", "β", "γ", "δ", "ε", "ζ", "η", "θ", "ι", "κ", "λ", "μ", "ν", "ξ", "ο", "π", "ρ", "σ", "τ", "υ", "φ", "χ", "ψ", "ω"]; +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"]; test('alphabets.latin should return Latin alphabet', () => { expect(alphabets.latin).toStrictEqual(latin); diff --git a/src/main.js b/src/main.js index 4d48db5..e5111c2 100644 --- a/src/main.js +++ b/src/main.js @@ -1,17 +1,21 @@ -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 greek = [ - "α", "β", "γ", "δ", "ε", "ζ", "η", "θ", "ι", "κ", "λ", "μ", "ν", "ξ", "ο", "π", "ρ", "σ", "τ", "υ", "φ", "χ", "ψ", "ω" -]; - -export const greekPolytonic = [ - "α", "β", "γ", "δ", "ε", "ζ", "η", "θ", "ι", "κ", "λ", "μ", "ν", "ξ", "ο", "π", "ρ", "σ", "τ", "υ", "φ", "χ", "ψ", "ω" -]; +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', 'æ', 'ø', 'å']; +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 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 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 [ - latin, + danish, + elfadian, + faroese, greek, greekPolytonic, + icelandic, + latin, + norwegian, + swedish, ];