ciphers-gematria 1.0.4 → 2.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/README.md +100 -6
- package/dist/index.cjs +1141 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +71 -0
- package/dist/index.d.ts +71 -1
- package/dist/index.js +1141 -1
- package/dist/index.js.map +1 -0
- package/package.json +16 -8
- package/dist/calcul.d.ts +0 -65
- package/dist/calcul.js +0 -91
- package/dist/ciphers.d.ts +0 -33
- package/dist/ciphers.js +0 -973
- package/dist/types/cipherFn.d.ts +0 -1
- package/dist/types/cipherFn.js +0 -1
- package/dist/types/table.d.ts +0 -5
- package/dist/types/table.js +0 -1
package/README.md
CHANGED
|
@@ -13,12 +13,15 @@ npm install ciphers-gematria
|
|
|
13
13
|
yarn add ciphers-gematria
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## ⚡ Quick start
|
|
17
17
|
|
|
18
18
|
```javascript
|
|
19
|
-
import { ciphers } from 'ciphers-gematria';
|
|
19
|
+
import { ciphers } from 'ciphers-gematria'; // ESM
|
|
20
|
+
const gematria = require('ciphers-gematria'); // CJS
|
|
21
|
+
|
|
22
|
+
const result = ciphers("hello"); // ESM
|
|
23
|
+
const result = gematria.ciphers("hello"); // CJS
|
|
20
24
|
|
|
21
|
-
const result = ciphers("hello");
|
|
22
25
|
console.log(result);
|
|
23
26
|
|
|
24
27
|
// Output:
|
|
@@ -60,17 +63,108 @@ console.log(result);
|
|
|
60
63
|
---
|
|
61
64
|
|
|
62
65
|
## Calculate a single cipher
|
|
63
|
-
|
|
66
|
+
### ESM
|
|
67
|
+
♻️ Only the imported cipher will be included in your final bundle.
|
|
64
68
|
```javascript
|
|
65
|
-
import { sumerian, chaldean } from 'ciphers-gematria';
|
|
69
|
+
import { sumerian, latin, chaldean } from 'ciphers-gematria';
|
|
66
70
|
|
|
67
71
|
console.log(sumerian('hello')); // 312
|
|
68
72
|
console.log(chaldean('hello')); // 23
|
|
69
73
|
```
|
|
70
74
|
|
|
75
|
+
### CJS
|
|
76
|
+
```javascript
|
|
77
|
+
const gematria = require('ciphers-gematria');
|
|
78
|
+
|
|
79
|
+
console.log(gematria.latin('hello')); // 312
|
|
80
|
+
console.log(gematria.chaldean('hello')); // 23
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
## 🛠️ Create a custom cipher
|
|
85
|
+
|
|
86
|
+
createCipher is a function:
|
|
87
|
+
it returns a new cipher function based on a custom letter-value table.
|
|
88
|
+
|
|
89
|
+
### ESM
|
|
90
|
+
```javascript
|
|
91
|
+
import { createCipher } from 'ciphers-gematria';
|
|
92
|
+
|
|
93
|
+
const mySpecialTable = {
|
|
94
|
+
A: 251, B: 101, C: 45, D:150 ...... Z:42
|
|
95
|
+
};
|
|
96
|
+
const myCustomCipher = createCipher(mySpecialTable);
|
|
97
|
+
console.log(myCustomCipher('hello'));
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
### CJS
|
|
101
|
+
```javascript
|
|
102
|
+
const gematria = require('ciphers-gematria');
|
|
103
|
+
|
|
104
|
+
const mySpecialTable = {
|
|
105
|
+
A: 251, B: 101, C: 45, D:150 ...... Z:42
|
|
106
|
+
};
|
|
107
|
+
const myCustomCipher = gematria.createCipher(mySpecialTable);
|
|
108
|
+
console.log(myCustomCipher('hello'));
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
## 📚 Available ciphers
|
|
113
|
+
|
|
114
|
+
<table style="background-color: #f1f1f1; border-radius: 5px; padding: 5px">
|
|
115
|
+
<tr s>
|
|
116
|
+
<td >Ordinal</td>
|
|
117
|
+
<td >Reduction</td>
|
|
118
|
+
<td >Reverse</td>
|
|
119
|
+
<td >Reverse Reduction</td>
|
|
120
|
+
</tr>
|
|
121
|
+
<tr>
|
|
122
|
+
<td>Standard</td>
|
|
123
|
+
<td >Latin</td>
|
|
124
|
+
<td >Sumerian</td>
|
|
125
|
+
<td >Reverse Sumerian</td>
|
|
126
|
+
</tr>
|
|
127
|
+
<tr>
|
|
128
|
+
<td>Capitals Mixed</td>
|
|
129
|
+
<td >Capitals Added</td>
|
|
130
|
+
<td >Reverse Capitals Mixed</td>
|
|
131
|
+
<td >Reverse Capitals Added</td>
|
|
132
|
+
</tr>
|
|
133
|
+
<tr>
|
|
134
|
+
<td>Reverse Standard</td>
|
|
135
|
+
<td >Satanic</td>
|
|
136
|
+
<td >Reverse Satanic</td>
|
|
137
|
+
<td >Single Reduction</td>
|
|
138
|
+
</tr>
|
|
139
|
+
<tr>
|
|
140
|
+
<td>Kv Exception</td>
|
|
141
|
+
<td >Skv Exception</td>
|
|
142
|
+
<td >Reverse Single Reduction</td>
|
|
143
|
+
<td >Ep Exception</td>
|
|
144
|
+
</tr>
|
|
145
|
+
<tr>
|
|
146
|
+
<td>Ehp Exception</td>
|
|
147
|
+
<td >Primes</td>
|
|
148
|
+
<td >Trigonal</td>
|
|
149
|
+
<td >Squares</td>
|
|
150
|
+
</tr>
|
|
151
|
+
<tr>
|
|
152
|
+
<td>Fibonacci</td>
|
|
153
|
+
<td >Reverse Primes</td>
|
|
154
|
+
<td >Reverse Trigonal</td>
|
|
155
|
+
<td >Reverse Squares</td>
|
|
156
|
+
</tr>
|
|
157
|
+
<tr>
|
|
158
|
+
<td>Chaldean</td>
|
|
159
|
+
<td >Septenary</td>
|
|
160
|
+
<td >Keypad</td>
|
|
161
|
+
</tr>
|
|
162
|
+
</table>
|
|
163
|
+
|
|
71
164
|
---
|
|
72
165
|
## 🤝Contribution
|
|
73
166
|
|
|
74
167
|
Contributions are welcome! If you’d like to add a new cipher.
|
|
75
168
|
|
|
76
|
-
Fork the repository and create a pull request
|
|
169
|
+
Fork the repository and create a pull request
|
|
170
|
+
|