bindu 1.0.0 → 1.0.1
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 +4 -0
- package/README.md +20 -0
- package/lib/bindu.js +3 -2
- package/package.json +1 -1
package/ChangeLog
ADDED
package/README.md
CHANGED
|
@@ -9,14 +9,34 @@
|
|
|
9
9
|
[CoverageURL]: https://coveralls.io/github/putoutjs/bindu?branch=master
|
|
10
10
|
[CoverageIMGURL]: https://coveralls.io/repos/putoutjs/bindu/badge.svg?branch=master&service=github
|
|
11
11
|
|
|
12
|
+
<img width="314" height="235" alt="image" src="https://github.com/user-attachments/assets/ac0247ca-b8ae-4c48-bc67-3422b6b04926" />
|
|
13
|
+
|
|
12
14
|
> Bindu (Sanskrit: बिंदु) is a Sanskrit word meaning "point", "drop" or "dot".
|
|
13
15
|
|
|
16
|
+
[Pāṇini](https://en.wikipedia.org/wiki/P%C4%81%E1%B9%87ini) [Aṣṭādhyāyī](https://en.wikipedia.org/wiki/A%E1%B9%A3%E1%B9%AD%C4%81dhy%C4%81y%C4%AB) set of sanscrit grammar rules.
|
|
17
|
+
|
|
14
18
|
## Install
|
|
15
19
|
|
|
16
20
|
```
|
|
17
21
|
npm i bindu -g
|
|
18
22
|
```
|
|
19
23
|
|
|
24
|
+
## Usage Example
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import {bindu} from 'bindu';
|
|
28
|
+
|
|
29
|
+
const {code} = bindu('प्रतिएक');
|
|
30
|
+
|
|
31
|
+
// 'प्रत्येक';
|
|
32
|
+
const {places} = bindu('प्रतिएक', {
|
|
33
|
+
fix: false,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
places[0].message;
|
|
37
|
+
// vṛddhirādaic: ie -> ye
|
|
38
|
+
```
|
|
39
|
+
|
|
20
40
|
## Rules
|
|
21
41
|
|
|
22
42
|
- ✅ [`apply-vriddhi`](https://putout.cloudcmd.io/#/gist/59a1854deb359883a3a6e1eb60e82e21/23f7ee70713f9b32cce13774a9bef454bc0f2ce0`);
|
package/lib/bindu.js
CHANGED
|
@@ -14,11 +14,12 @@ export const bindu = (text, {fix = true} = {}) => {
|
|
|
14
14
|
],
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
-
const cleanText = code
|
|
17
|
+
const cleanText = code
|
|
18
|
+
.replaceAll(/[,;()]/g, '')
|
|
19
|
+
.slice(0, -1);
|
|
18
20
|
|
|
19
21
|
return {
|
|
20
22
|
code: toDevanagari(cleanText),
|
|
21
23
|
places,
|
|
22
24
|
};
|
|
23
25
|
};
|
|
24
|
-
|