taraskevizer 1.0.0 → 1.0.2

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.
Files changed (2) hide show
  1. package/README.md +23 -9
  2. package/package.json +4 -2
package/README.md CHANGED
@@ -4,7 +4,6 @@
4
4
  $ npm i taraskevizer
5
5
  ```
6
6
 
7
-
8
7
  ## Usage
9
8
 
10
9
  ```js
@@ -18,38 +17,49 @@ const result = await tarask(text);
18
17
  ## API
19
18
 
20
19
  ### tarask(text, options?)
20
+
21
21
  Returns a `Promise<string>`
22
22
 
23
23
  ### taraskSync(text, options?)
24
+
24
25
  Returns a `string`
25
26
 
26
27
  #### text
28
+
27
29
  Type: `string`
28
30
 
29
31
  ## Options
32
+
30
33
  Type: `object`
31
34
 
32
35
  ### abc
36
+
33
37
  Type: `number`
34
38
 
35
39
  Default value: `0`
36
40
 
37
41
  Alphabet of output text:
38
- 0. cyrillic
39
- 1. latin
40
- 2. arabic
42
+ ```
43
+ 0 = cyrillic
44
+ 1 = latin
45
+ 2 = arabic
46
+ ```
41
47
 
42
48
  ### j
49
+
43
50
  Type: `number`
44
51
 
45
52
  Default value: `0`
46
53
 
47
54
  When to replace `і`(`i`) by `й`(`j`) after vowels:
48
- 0. never
49
- 1. random
50
- 2. always
55
+ ```
56
+ 0 = never
57
+ 1 = random
58
+ 2 = always
59
+ ```
51
60
 
52
61
  ### html
62
+
53
63
  Type: `false|object`
54
64
 
55
65
  Default value: `false`
@@ -57,19 +67,21 @@ Default value: `false`
57
67
  If `object`, some parts of a text are wrapped in HTML tags.
58
68
 
59
69
  #### g
70
+
60
71
  Type: `boolean`
61
72
 
62
73
  Default value: `false`
63
74
 
64
75
  Do replace `г`(`h`) by `ґ`(`g`) in cyrillic alphabet?
76
+
65
77
  ```html
66
- false: <tarH>г</tarH> <tarH>Г</tarH>
67
- true: <tarH>ґ</tarH> <tarH>Ґ</tarH>
78
+ false: <tarH>г</tarH> <tarH>Г</tarH> true: <tarH>ґ</tarH> <tarH>Ґ</tarH>
68
79
  ```
69
80
 
70
81
  ## HTML tags
71
82
 
72
83
  ### tarF
84
+
73
85
  Difference between an input and an output word.
74
86
 
75
87
  ```html
@@ -79,6 +91,7 @@ Difference between an input and an output word.
79
91
  ```
80
92
 
81
93
  ### tarL
94
+
82
95
  A part of a word wrapped in this tag is variable,
83
96
  variations are mentioned in a `data-l` attribute
84
97
  and are separated by commas
@@ -90,6 +103,7 @@ and are separated by commas
90
103
  ```
91
104
 
92
105
  ### tarH
106
+
93
107
  Can be replaced by `ґ`(`g`) letter. appears only if alphabet is cyrillic
94
108
 
95
109
  ```html
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "taraskevizer",
3
3
  "author": "GooseOb",
4
4
  "license": "MIT",
5
- "version": "1.0.0",
5
+ "version": "1.0.2",
6
6
  "private": false,
7
7
  "homepage": "https://gooseob.github.io/taraskevizatar/",
8
8
  "main": "dist/index.js",
@@ -13,7 +13,8 @@
13
13
  "README.md"
14
14
  ],
15
15
  "scripts": {
16
- "build": "tsup --config build-config/index.js"
16
+ "build": "tsup --config build-config/index.js",
17
+ "prepare": "husky install"
17
18
  },
18
19
  "repository": {
19
20
  "type": "git",
@@ -27,6 +28,7 @@
27
28
  "belarusian"
28
29
  ],
29
30
  "devDependencies": {
31
+ "husky": "^8.0.3",
30
32
  "prettier": "^3.0.0",
31
33
  "tsup": "^6.5.0",
32
34
  "typescript": "^4.9.4"