words-global 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,10 +2,20 @@
2
2
 
3
3
  Providing access to alphabets from different languages and dialects. This package aims to solve the problem of lacking access to alphabetic characters for various use cases.
4
4
 
5
+ ![Words Global icon](./icon.png)
6
+
7
+ The first approach is simpler and keeps the markdown syntax.
8
+
5
9
  ## Usage
6
10
 
11
+ ```bash
12
+ npm install words-global
13
+ ```
14
+
15
+ **JavaScript code**:
16
+
7
17
  ```JavaScript
8
- import { Alphabet } from "./index.js";
18
+ import { Alphabet } from "words-global";
9
19
 
10
20
  const alphabet = new Alphabet("english");
11
21
  console.log(alphabet.getLetters());
@@ -17,6 +27,7 @@ console.log(alphabet.language);
17
27
  - [**English**](/languages/english.js)
18
28
  - [**Russian**](/languages/russian.js) - [source](https://en.wikipedia.org/wiki/Russian_alphabet)
19
29
  - [**Arabic**](/languages/russian.js) - [source](https://www.arabichomeschool.com/post/arabic-alphabet-with-words-alif-to-ya-vocabulary-builder-for-kids)
30
+ - [French](/languages/french.js)
20
31
 
21
32
  ## Contribution Guide
22
33
 
@@ -30,4 +41,4 @@ console.log(alphabet.language);
30
41
  ## Rules
31
42
 
32
43
  1. Only use double-quotes.
33
- 2. Always use semi-colons;
44
+ 2. Always use semi-colons.
package/icon.png ADDED
Binary file
package/index.js CHANGED
@@ -1,10 +1,16 @@
1
1
  import { arabicAlphabet } from "./languages/arabic.js";
2
2
  import { englishAlphabet } from "./languages/english.js";
3
+ import { frenchLetters } from "./languages/french.js";
3
4
  import { russianAlphabet } from "./languages/russian.js";
4
5
 
5
6
  /**
6
7
  * The main class export
7
- * @param language - The specified value will determine the returned alphabet
8
+ * @param language - The specified value will determine the alphabet that will be returned
9
+ * @returns The letters of the specified alphabet
10
+ * @example
11
+ * import { Alphabet } from "words-global";
12
+ * const alphabet = new Alphabet("english");
13
+ * console.log(alphabet.getLetters()); // Outputs the English alphabet letters
8
14
  */
9
15
  export class Alphabet {
10
16
  constructor(language) {
@@ -19,6 +25,8 @@ export class Alphabet {
19
25
  return russianAlphabet;
20
26
  case "arabic":
21
27
  return arabicAlphabet;
28
+ case "french":
29
+ return frenchLetters;
22
30
  default:
23
31
  return "Language not found";
24
32
  }
@@ -0,0 +1,15 @@
1
+ export const frenchLetters = [
2
+ "é",
3
+ "à",
4
+ "è",
5
+ "ù",
6
+ "â",
7
+ "ê",
8
+ "î",
9
+ "ô",
10
+ "û",
11
+ "ë",
12
+ "ï",
13
+ "ü",
14
+ "ç",
15
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "words-global",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Providing access to alphabets from different languages and dialects",
5
5
  "keywords": [
6
6
  "internationalization",