mirror of
https://github.com/garraflavatra/alphabets.git
synced 2025-04-19 10:51:02 +00:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
03880f2bbe | |||
3da31450c0 | |||
d070b6c2f1 | |||
c917b46c48 |
@ -1,4 +1,4 @@
|
|||||||
## [Unreleased]
|
## [v2.0.5]
|
||||||
|
|
||||||
Added Polish alphabet, plus support for Deno!
|
Added Polish alphabet, plus support for Deno!
|
||||||
|
|
||||||
@ -54,3 +54,4 @@ Initial release.
|
|||||||
[v2.0.2]: https://github.com/garraflavatra/alphabets/releases/tag/v2.0.2
|
[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.3]: https://github.com/garraflavatra/alphabets/releases/tag/v2.0.3
|
||||||
[v2.0.4]: https://github.com/garraflavatra/alphabets/releases/tag/v2.0.4
|
[v2.0.4]: https://github.com/garraflavatra/alphabets/releases/tag/v2.0.4
|
||||||
|
[v2.0.5]: https://github.com/garraflavatra/alphabets/releases/tag/v2.0.5
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2021-2023 Romein van Buren <<romein@vburen.nl>>
|
Copyright (c) 2021-2024 Romein van Buren <<romein@vburen.nl>>
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
32
README.md
32
README.md
@ -1,9 +1,16 @@
|
|||||||
# Alphabets
|
# Alphabets
|
||||||
|
|
||||||
A tiny JS package that exports many different alphabets for many different use cases.
|
Alphabets contains many different alphabets for many different use cases.
|
||||||
|
|
||||||
[](https://www.npmjs.com/package/alphabets)
|
[](https://www.npmjs.com/package/alphabets)
|
||||||
[](https://stand-with-ukraine.pp.ua)
|
|
||||||
|
- [Included alphabets](#included-alphabets)
|
||||||
|
- [How to use](#how-to-use)
|
||||||
|
- [JS module](#js-module)
|
||||||
|
- [JSON file](#json-file)
|
||||||
|
- [Motivation](#motivation)
|
||||||
|
- [Questions and bugs](#questions-and-bugs)
|
||||||
|
- [Copyright](#copyright)
|
||||||
|
|
||||||
## Included alphabets
|
## Included alphabets
|
||||||
|
|
||||||
@ -23,7 +30,9 @@ See below for [usage instructions](#how-to-use).
|
|||||||
| `swedish` | [Swedish](https://en.wikipedia.org/wiki/Swedish_alphabet) |
|
| `swedish` | [Swedish](https://en.wikipedia.org/wiki/Swedish_alphabet) |
|
||||||
| `ukrainian` | [Ukrainian](https://en.wikipedia.org/wiki/Ukrainian_alphabet) |
|
| `ukrainian` | [Ukrainian](https://en.wikipedia.org/wiki/Ukrainian_alphabet) |
|
||||||
|
|
||||||
## Installation
|
## How to use
|
||||||
|
|
||||||
|
### JS module
|
||||||
|
|
||||||
Install the [alphabets npm module](https://www.npmjs.com/package/alphabets) using your preferred package manager:
|
Install the [alphabets npm module](https://www.npmjs.com/package/alphabets) using your preferred package manager:
|
||||||
|
|
||||||
@ -33,8 +42,6 @@ Install the [alphabets npm module](https://www.npmjs.com/package/alphabets) usin
|
|||||||
|
|
||||||
You can also use it with [Deno](https://deno.land/) by importing `https://deno.land/x/alphabets/alphabets.mjs`.
|
You can also use it with [Deno](https://deno.land/) by importing `https://deno.land/x/alphabets/alphabets.mjs`.
|
||||||
|
|
||||||
## How to use
|
|
||||||
|
|
||||||
Replace `<alphabetYouWantToUse>` with an [alphabet identifier](#included-alphabets) this package exports:
|
Replace `<alphabetYouWantToUse>` with an [alphabet identifier](#included-alphabets) this package exports:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
@ -54,7 +61,14 @@ const alphabets = require('alphabets');
|
|||||||
console.log(alphabets.<alphabetYouWantToUse>);
|
console.log(alphabets.<alphabetYouWantToUse>);
|
||||||
```
|
```
|
||||||
|
|
||||||
## Why
|
### JSON file
|
||||||
|
|
||||||
|
Or load the JSON file with alphabets directly from a CDN:
|
||||||
|
|
||||||
|
* https://cdn.jsdelivr.net/npm/alphabets@2/alphabets.json
|
||||||
|
* https://unpkg.com/alphabets@2/alphabets.json
|
||||||
|
|
||||||
|
## Motivation
|
||||||
|
|
||||||
I have seen [code like this](https://github.com/search?q=%27abcdefghijklmnopqrstuvwxyz%27.split%28%27%27%29+language%3AJavaScript&type=code&l=JavaScript):
|
I have seen [code like this](https://github.com/search?q=%27abcdefghijklmnopqrstuvwxyz%27.split%28%27%27%29+language%3AJavaScript&type=code&l=JavaScript):
|
||||||
|
|
||||||
@ -68,7 +82,7 @@ Or [even worse](https://github.com/search?q=%5B%22a%22%2C+%22b%22%2C+%22c%22%2C+
|
|||||||
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"];
|
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, why not [do it like this](#how-to-use):
|
My opinion about this: it's verbose, ugly, and it pollutes your code. Instead, why not [do it like this](#how-to-use):
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import { latin } from 'alphabets';
|
import { latin } from 'alphabets';
|
||||||
@ -86,6 +100,8 @@ You may use the same issue form for questions, too.
|
|||||||
|
|
||||||
## Copyright
|
## Copyright
|
||||||
|
|
||||||
(c) 2021-2023 [Romein van Buren](mailto:romein@vburen.nl). Licensed under the MIT license.
|
(c) 2021-2024 [Romein van Buren](mailto:romein@vburen.nl). Licensed under the MIT license.
|
||||||
|
|
||||||
For the full copyright and license information, please see the [`LICENSE.md`](./LICENSE.md) file that was distributed with this source code.
|
For the full copyright and license information, please see the [`LICENSE.md`](./LICENSE.md) file that was distributed with this source code.
|
||||||
|
|
||||||
|
[](https://www.smartyellow.nl)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user