bindu 1.12.0 → 2.0.0
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/ChangeLog +9 -0
- package/README.md +13 -0
- package/lib/avyaya/particles.js +1 -0
- package/lib/sandhi/ac/apply-guna/index.js +4 -1
- package/lib/sandhi/ac/apply-purvarupa/index.js +5 -5
- package/lib/sandhi/ac/apply-vriddhi/index.js +3 -0
- package/lib/sandhi/ac/apply-yan/index.js +1 -0
- package/package.json +5 -5
package/ChangeLog
CHANGED
package/README.md
CHANGED
|
@@ -27,6 +27,7 @@ npm i bindu -g
|
|
|
27
27
|
import {bindu} from 'bindu';
|
|
28
28
|
|
|
29
29
|
bindu('प्रतिएक');
|
|
30
|
+
|
|
30
31
|
// returns {code: 'प्रत्येक'}
|
|
31
32
|
bindu('द्रौपदी अश्वम्', {
|
|
32
33
|
type: 'iast',
|
|
@@ -85,6 +86,18 @@ au + a → au'
|
|
|
85
86
|
bhoati → bhavati
|
|
86
87
|
```
|
|
87
88
|
|
|
89
|
+
#### apply-guna
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
भूत्वा + इह → भूत्वेह
|
|
93
|
+
bhUtvA + iha → bhUtveha
|
|
94
|
+
bhūtvā + iha → bhūtveha
|
|
95
|
+
|
|
96
|
+
देव + ऋषि → देवर्षि
|
|
97
|
+
deva + fzi → devarzi
|
|
98
|
+
deva + ṛṣi → devarṣi
|
|
99
|
+
```
|
|
100
|
+
|
|
88
101
|
#### apply-ayadaya
|
|
89
102
|
|
|
90
103
|
##### ए
|
package/lib/avyaya/particles.js
CHANGED
|
@@ -4,8 +4,11 @@ const {remove} = operator;
|
|
|
4
4
|
const SANDHI = {
|
|
5
5
|
i: 'e',
|
|
6
6
|
u: 'o',
|
|
7
|
+
f: 'ar',
|
|
7
8
|
};
|
|
8
9
|
|
|
10
|
+
const isSandhiVowel = (c) => Object.hasOwn(SANDHI, c);
|
|
11
|
+
|
|
9
12
|
export const report = () => `ād‑guṇaḥ`;
|
|
10
13
|
|
|
11
14
|
export const fix = ({path, next, name, nextName, guna}) => {
|
|
@@ -31,7 +34,7 @@ export const traverse = ({push}) => ({
|
|
|
31
34
|
.at(0)
|
|
32
35
|
.toLowerCase();
|
|
33
36
|
|
|
34
|
-
if (last !== 'a' ||
|
|
37
|
+
if (last !== 'a' || !isSandhiVowel(first))
|
|
35
38
|
return;
|
|
36
39
|
|
|
37
40
|
const guna = SANDHI[first];
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {operator} from 'putout';
|
|
2
1
|
import {avyayamAsti} from '#avyaya';
|
|
3
2
|
|
|
4
|
-
const {remove} = operator;
|
|
5
|
-
|
|
6
3
|
export const report = () => `ekaḥ pūrvaparayoḥ`;
|
|
7
4
|
|
|
8
|
-
export const fix = ({path,
|
|
5
|
+
export const fix = ({path, name, nextName}) => {
|
|
9
6
|
path.node.name = `${name}${nextName.slice(1)}`;
|
|
10
|
-
|
|
7
|
+
path.parentPath.node.expressions.pop();
|
|
11
8
|
};
|
|
12
9
|
|
|
13
10
|
export const traverse = ({push}) => ({
|
|
14
11
|
Identifier(path) {
|
|
15
12
|
const next = path.getNextSibling();
|
|
16
13
|
|
|
14
|
+
if (!path.parentPath.isSequenceExpression())
|
|
15
|
+
return;
|
|
16
|
+
|
|
17
17
|
if (!next.node)
|
|
18
18
|
return;
|
|
19
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bindu",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Pāṇini Aṣṭādhyāyī",
|
|
5
5
|
"main": "lib/bindu.js",
|
|
6
6
|
"bin": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"homepage": "https://github.com/putoutjs/bindu",
|
|
37
37
|
"license": "MIT",
|
|
38
38
|
"engines": {
|
|
39
|
-
"node": ">=
|
|
39
|
+
"node": ">=22"
|
|
40
40
|
},
|
|
41
41
|
"imports": {
|
|
42
42
|
"#avyaya": "./lib/avyaya/index.js"
|
|
@@ -47,16 +47,16 @@
|
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@putout/test": "^15.1.1",
|
|
50
|
-
"c8": "^10.1.2",
|
|
51
50
|
"eslint": "^10.0.0",
|
|
52
51
|
"eslint-plugin-putout": "^31.0.0",
|
|
53
52
|
"fast-xml-parser": "^5.3.3",
|
|
54
53
|
"ipull": "^4.0.3",
|
|
55
54
|
"madrun": "^13.0.0",
|
|
56
|
-
"montag": "^
|
|
55
|
+
"montag": "^2.0.1",
|
|
57
56
|
"nodemon": "^3.0.1",
|
|
58
57
|
"redlint": "^6.0.0",
|
|
59
|
-
"
|
|
58
|
+
"superc8": "^12.7.0",
|
|
59
|
+
"supertape": "^13.2.0",
|
|
60
60
|
"try-to-catch": "^4.0.5"
|
|
61
61
|
},
|
|
62
62
|
"publishConfig": {
|