mirror of
https://github.com/garraflavatra/alphabets.git
synced 2025-07-01 10:35:11 +00:00
Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
051fd40ceb
|
|||
c5fc996e1d
|
|||
51b89c682b
|
|||
08f70efc05
|
|||
045f7b7692
|
|||
e5ac541144
|
|||
917572551c
|
|||
db4296b2e3
|
|||
7d8e954fda
|
|||
e643f904ca
|
|||
97d99b62e7
|
|||
a2a358e44a
|
|||
12b45f74fa
|
|||
8166424571
|
|||
d99ab630fd
|
52
CHANGELOG.md
Normal file
52
CHANGELOG.md
Normal file
@ -0,0 +1,52 @@
|
||||
# [v2.0.4]
|
||||
|
||||
Fixed the X-ray entry in the NATO alphabet.
|
||||
|
||||
# [v2.0.3]
|
||||
|
||||
Added the [NATO phonetic alphabet](https://en.wikipedia.org/wiki/NATO_phonetic_alphabet).
|
||||
|
||||
# [v2.0.2]
|
||||
|
||||
Fixed a double typo in package.json and package-lock.json (see 237fb6a).
|
||||
|
||||
# [v2.0.1]
|
||||
|
||||
Added Ukrainian alphabet.
|
||||
|
||||
# [v2.0.0]
|
||||
|
||||
Huge improvements...
|
||||
|
||||
# [v1.2.0]
|
||||
|
||||
Added Russian alphabet! It is exported as `russian`.
|
||||
|
||||
# [v1.1.0]
|
||||
|
||||
Added Scandinavian alphabets. This package now exports the following alphabets:
|
||||
|
||||
| Name | Export name |
|
||||
|---------------------------|------------------|
|
||||
| Danish | `danish` |
|
||||
| Faroese | `faroese` |
|
||||
| Greek (modern) | `greek` |
|
||||
| Greek (ancient/polytonic) | `greekPolytonic` |
|
||||
| Icelandic | `icelandic` |
|
||||
| Latin | `latin` |
|
||||
| Norwegian | `norwegian` |
|
||||
| Swedish | `swedish` |
|
||||
|
||||
# [v1.0.0]
|
||||
|
||||
Initial release.
|
||||
|
||||
[Unreleased]: https://github.com/garraflavatra/alphabets/tree/main
|
||||
[v1.0.0]: https://github.com/garraflavatra/alphabets/releases/tag/1.0.0
|
||||
[v1.1.0]: https://github.com/garraflavatra/alphabets/releases/tag/1.1.0
|
||||
[v1.2.0]: https://github.com/garraflavatra/alphabets/releases/tag/1.2.0
|
||||
[v2.0.0]: https://github.com/garraflavatra/alphabets/releases/tag/v2.0.0
|
||||
[v2.0.1]: https://github.com/garraflavatra/alphabets/releases/tag/v2.0.1
|
||||
[v2.0.2]: https://github.com/garraflavatra/alphabets/releases/tag/v2.0.2
|
||||
[v2.0.3]: https://github.com/garraflavatra/alphabets/releases/tag/v2.0.3
|
||||
[v2.0.4]: https://github.com/garraflavatra/alphabets/releases/tag/v2.0.4
|
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2021-2023 Romein van Buren
|
||||
Copyright (c) 2021-2023 Romein van Buren <<romein@vburen.nl>>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
48
README.md
48
README.md
@ -1,30 +1,28 @@
|
||||
# Alphabets
|
||||
|
||||
A tiny JS dependency which exports many alphabets for many use cases.
|
||||
A tiny JS package that exports many different alphabets for many different use cases.
|
||||
|
||||
[](https://www.npmjs.com/package/alphabets)
|
||||
[](https://stand-with-ukraine.pp.ua)
|
||||
|
||||
## Why
|
||||
|
||||
I have seen code like this:
|
||||
I have seen [code like this]:
|
||||
|
||||
```js
|
||||
const alphabet = 'abcdefghijklmnopqrstuvwxyz'.split('');
|
||||
```
|
||||
|
||||
Or worse:
|
||||
Or [worse]:
|
||||
|
||||
```js
|
||||
const alphabet = ["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"];
|
||||
```
|
||||
|
||||
My opinion about this: it's ugly, and it pollutes your code. Instead, you should do it like so:
|
||||
My opinion about this: it's ugly, and it pollutes your code. Instead, why not [do it like this](#how-to-use):
|
||||
|
||||
```js
|
||||
import { latin } from 'alphabets';
|
||||
// or
|
||||
const alphabets = require('alphabets');
|
||||
|
||||
doSomethingWithTheAlphabet(latin);
|
||||
```
|
||||
@ -33,24 +31,29 @@ Much cleaner, right?
|
||||
|
||||
## Installation
|
||||
|
||||
Use npm: [`npm i alphabets`](https://www.npmjs.com/package/alphabets). Or if you prefer Yarn: `yarn add alphabets`.
|
||||
Install the [alphabets npm module](https://www.npmjs.com/package/alphabets) using your preferred package manager:
|
||||
|
||||
* npm: `npm install alphabets`
|
||||
* Yarn: `yarn add alphabets`
|
||||
* pnpm: `pnpm add alphabets`
|
||||
|
||||
## Supported alphabets
|
||||
|
||||
See below for usage instructions.
|
||||
See below for [usage instructions](#how-to-use).
|
||||
|
||||
| Alphabet | Export name |
|
||||
|------|-------------|
|
||||
| Danish | `danish` |
|
||||
| Faroese | `faroese` |
|
||||
| Greek (modern) | `greek` |
|
||||
| Alphabet | Export name |
|
||||
|---------------------------|------------------|
|
||||
| Danish | `danish` |
|
||||
| Faroese | `faroese` |
|
||||
| Greek (modern) | `greek` |
|
||||
| Greek (ancient/polytonic) | `greekPolytonic` |
|
||||
| Icelandic | `icelandic` |
|
||||
| Latin (abcdefg etc.) | `latin` |
|
||||
| Norwegian | `norwegian` |
|
||||
| Russian | `russian` |
|
||||
| Swedish | `swedish` |
|
||||
| Ukrainian | `ukrainian` |
|
||||
| Icelandic | `icelandic` |
|
||||
| Latin (abcdefg etc.) | `latin` |
|
||||
| [NATO phonetic alphabet] | `nato` |
|
||||
| Norwegian | `norwegian` |
|
||||
| Russian | `russian` |
|
||||
| Swedish | `swedish` |
|
||||
| Ukrainian | `ukrainian` |
|
||||
|
||||
## How to use
|
||||
|
||||
@ -71,4 +74,9 @@ console.log(alphabets.<alphabetYouWantToUse>);
|
||||
|
||||
(c) 2021-2023 Romein van Buren. Licensed under the MIT license.
|
||||
|
||||
For the full copyright and license information, please view the [`license.md`](./license.md) file that was distributed with this source code.
|
||||
For the full copyright and license information, please view the [`LICENSE.md`](./LICENSE.md) file that was distributed with this source code.
|
||||
|
||||
|
||||
[code like this]: https://github.com/search?q=%27abcdefghijklmnopqrstuvwxyz%27.split%28%27%27%29+language%3AJavaScript&type=code&l=JavaScript
|
||||
[worse]: https://github.com/search?q=%5B%22a%22%2C+%22b%22%2C+%22c%22%2C+%22d%22%2C+%22e%22%2C+%22f%22%2C+%22g%22%2C+%22h%22%2C+%22i%22%2C+%22j%22%2C+%22k%22%2C+%22l%22%2C+%22m%22%2C+%22n%22%2C+%22o%22%2C+%22p%22%2C+%22q%22%2C+%22r%22%2C+%22s%22%2C+%22t%22%2C+%22u%22%2C+%22v%22%2C+%22w%22%2C+%22x%22%2C+%22y%22%2C+%22z%22%5D+language%3AJavaScript&type=code&l=JavaScript
|
||||
[NATO phonetic alphabet]: https://en.wikipedia.org/wiki/NATO_phonetic_alphabet
|
||||
|
@ -14,6 +14,8 @@
|
||||
|
||||
"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"],
|
||||
|
||||
"nato": ["Alfa", "Bravo", "Charlie", "Delta", "Echo", "Foxtrot", "Golf", "Hotel", "India", "Juliett", "Kilo", "Lima", "Mike", "November", "Oscar", "Papa", "Quebec", "Romeo", "Sierra", "Tango", "Uniform", "Victor", "Whiskey", "X-ray", "Yankee", "Zulu"],
|
||||
|
||||
"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", "æ", "ø", "å"],
|
||||
|
||||
"russian": ["а", "б", "в", "г", "д", "е", "ё", "ж", "з", "и", "й", "к", "л", "м", "н", "о", "п", "р", "с", "т", "у", "ф", "х", "ц", "ч", "ш", "щ", "ъ", "ы", "ь", "э", "ю", "я"],
|
||||
|
@ -1 +1 @@
|
||||
export * from "./alphabets.json";
|
||||
export * from './alphabets.json';
|
||||
|
3854
package-lock.json
generated
3854
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
39
package.json
39
package.json
@ -1,24 +1,43 @@
|
||||
{
|
||||
"name": "alphabets",
|
||||
"keywords": ["alphabet", "alphabets"],
|
||||
"description": "Many different alphabets, many different use cases, zero depencencies.",
|
||||
|
||||
"description": "A collection of many different alphabets for many different use cases. ",
|
||||
"author": "Romein van Buren <romein@vburen.nl>",
|
||||
"version": "2.0.4",
|
||||
"homepage": "https://github.com/garraflavatra/alphabets#readme",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"alphabet",
|
||||
"alphabets"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/garraflavatra/alphabets.git"
|
||||
},
|
||||
|
||||
"version": "2.0.2",
|
||||
"author": "Romein van Buren <romein@vburen.eu>",
|
||||
"license": "MIT",
|
||||
|
||||
"main": "alphabets.cjs",
|
||||
"module": "alphabets.mjs",
|
||||
|
||||
"files": [
|
||||
"alphabets.cjs",
|
||||
"alphabets.mjs",
|
||||
"alphabets.json"
|
||||
]
|
||||
],
|
||||
"devDependencies": {
|
||||
"@garraflavatra/yeslint": "^1.0.0",
|
||||
"eslint": "^8.46.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "./node_modules/@garraflavatra/yeslint/configs/node.js",
|
||||
"rules": {
|
||||
"strict": "off"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.mjs"
|
||||
],
|
||||
"parserOptions": {
|
||||
"sourceType": "module"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user