Skip to content

Commit 2046014

Browse files
committed
Added Spanish to list of supported languages
1 parent 187a6f9 commit 2046014

File tree

7 files changed

+20
-3
lines changed

7 files changed

+20
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [1.2.0](https://github.com/MilosPaunovic/random-words/compare/1.1.0...1.2.0)
2+
3+
* Added Spanish to list of supported languages, closes [#14](https://github.com/MilosPaunovic/random-words/issues/3).
4+
15
## [1.1.0](https://github.com/MilosPaunovic/random-words/compare/1.0.1...1.1.0)
26

37
* Added English to list of supported languages, closes [#3](https://github.com/MilosPaunovic/random-words/issues/3).

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Currently available country codes and variations:
3232
| :------------ | :----------: | :--------: |
3333
| Serbia | `rs` | `cyrillic` |
3434
| United States | `us` | |
35+
| Spain | `es` | |
3536

3637
## Methods
3738

dictionaries/countries/es/es.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { initialize } from './lib/index.js';
2+
3+
const RANDOM = initialize({ countryCode: 'es' });
4+
5+
console.log(RANDOM.word());
6+
console.log(RANDOM.words());

lib/helpers/languages.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { WORDS as sr } from '../../dictionaries/countries/rs/sr.js';
22
import { WORDS as srCyrl } from '../../dictionaries/countries/rs/sr-Cyrl.js';
33
import { WORDS as en } from '../../dictionaries/countries/us/en.js';
4+
import { WORDS as es } from '../../dictionaries/countries/es/es.js';
45

56
export const LANGUAGES = Object.freeze({
67
rs: {
@@ -10,4 +11,7 @@ export const LANGUAGES = Object.freeze({
1011
us: {
1112
default: en,
1213
},
14+
es: {
15+
default: es,
16+
},
1317
});

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@paunovic/random-words",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"type": "module",
55
"description": "Serving random words in any language has never been this easy.",
66
"author": {
@@ -30,6 +30,7 @@
3030
"keywords": [
3131
"random-words",
3232
"english-words",
33+
"spanish-words",
3334
"serbian-words"
3435
]
3536
}

0 commit comments

Comments
 (0)