kaabalah 1.0.5 → 1.1.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/dist/gematria/index.d.mts +11 -13
- package/dist/gematria/index.d.ts +11 -13
- package/dist/gematria/index.js +22 -20
- package/dist/gematria/index.js.map +1 -1
- package/dist/gematria/index.mjs +22 -20
- package/dist/gematria/index.mjs.map +1 -1
- package/dist/index.js +22 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { x as TreeOfLife
|
|
1
|
+
import { x as TreeOfLife } from '../registry-CRL4UJrw.mjs';
|
|
2
2
|
|
|
3
3
|
declare const calculateGematria: (word: string, options?: {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
calculateMissingGematriaValues?: boolean;
|
|
5
|
+
calculateLetterPercentages?: boolean;
|
|
6
6
|
}, tree?: TreeOfLife) => {
|
|
7
7
|
vowels: {
|
|
8
8
|
originalSum: number;
|
|
@@ -19,18 +19,16 @@ declare const calculateGematria: (word: string, options?: {
|
|
|
19
19
|
reductionSteps: number[];
|
|
20
20
|
finalValue: number;
|
|
21
21
|
};
|
|
22
|
-
includedLetters:
|
|
23
|
-
|
|
22
|
+
includedLetters: {
|
|
23
|
+
latinLetterId: string;
|
|
24
24
|
value: number;
|
|
25
|
-
|
|
26
|
-
id: NodeId;
|
|
27
|
-
data: NodeData<"hebrewLetter">;
|
|
28
|
-
};
|
|
25
|
+
hebrewLetterId: string;
|
|
29
26
|
isVowel: boolean;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
}[];
|
|
28
|
+
missingGematriaValues: {
|
|
29
|
+
value: number;
|
|
30
|
+
hebrewLetter: string;
|
|
31
|
+
whenEnding: boolean;
|
|
34
32
|
}[] | undefined;
|
|
35
33
|
letterPercentages: {
|
|
36
34
|
percentageOfVowels: number;
|
package/dist/gematria/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { x as TreeOfLife
|
|
1
|
+
import { x as TreeOfLife } from '../registry-CRL4UJrw.js';
|
|
2
2
|
|
|
3
3
|
declare const calculateGematria: (word: string, options?: {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
calculateMissingGematriaValues?: boolean;
|
|
5
|
+
calculateLetterPercentages?: boolean;
|
|
6
6
|
}, tree?: TreeOfLife) => {
|
|
7
7
|
vowels: {
|
|
8
8
|
originalSum: number;
|
|
@@ -19,18 +19,16 @@ declare const calculateGematria: (word: string, options?: {
|
|
|
19
19
|
reductionSteps: number[];
|
|
20
20
|
finalValue: number;
|
|
21
21
|
};
|
|
22
|
-
includedLetters:
|
|
23
|
-
|
|
22
|
+
includedLetters: {
|
|
23
|
+
latinLetterId: string;
|
|
24
24
|
value: number;
|
|
25
|
-
|
|
26
|
-
id: NodeId;
|
|
27
|
-
data: NodeData<"hebrewLetter">;
|
|
28
|
-
};
|
|
25
|
+
hebrewLetterId: string;
|
|
29
26
|
isVowel: boolean;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
}[];
|
|
28
|
+
missingGematriaValues: {
|
|
29
|
+
value: number;
|
|
30
|
+
hebrewLetter: string;
|
|
31
|
+
whenEnding: boolean;
|
|
34
32
|
}[] | undefined;
|
|
35
33
|
letterPercentages: {
|
|
36
34
|
percentageOfVowels: number;
|
package/dist/gematria/index.js
CHANGED
|
@@ -2377,11 +2377,11 @@ var calculateGematria = (word, options = {}, tree) => {
|
|
|
2377
2377
|
if (!tree) {
|
|
2378
2378
|
tree = createTree({ system: SYSTEM2, parts: [] });
|
|
2379
2379
|
}
|
|
2380
|
-
const includedLetters =
|
|
2380
|
+
const includedLetters = [];
|
|
2381
2381
|
const words = word.toUpperCase().trim().split(" ");
|
|
2382
2382
|
let vowelsSum = 0;
|
|
2383
2383
|
let consonantsSum = 0;
|
|
2384
|
-
const
|
|
2384
|
+
const includedGematriaValues = /* @__PURE__ */ new Set();
|
|
2385
2385
|
const letterPercentages = {
|
|
2386
2386
|
percentageOfVowels: 0,
|
|
2387
2387
|
percentageOfConsonants: 0,
|
|
@@ -2402,8 +2402,8 @@ var calculateGematria = (word, options = {}, tree) => {
|
|
|
2402
2402
|
if (isEnding2 && mapping2.data.gematriaValueWhenEnding !== void 0) {
|
|
2403
2403
|
value = mapping2.data.gematriaValueWhenEnding;
|
|
2404
2404
|
}
|
|
2405
|
-
|
|
2406
|
-
includedLetters.
|
|
2405
|
+
includedGematriaValues.add(value);
|
|
2406
|
+
includedLetters.push({ latinLetterId: latinLetterId2, value, hebrewLetterId: mapping2.id, isVowel: isVowel(letter) });
|
|
2407
2407
|
consonantsSum += value;
|
|
2408
2408
|
i++;
|
|
2409
2409
|
continue;
|
|
@@ -2424,8 +2424,8 @@ var calculateGematria = (word, options = {}, tree) => {
|
|
|
2424
2424
|
if (isEnding && mapping.data.gematriaValueWhenEnding !== void 0) {
|
|
2425
2425
|
value = mapping.data.gematriaValueWhenEnding;
|
|
2426
2426
|
}
|
|
2427
|
-
|
|
2428
|
-
includedLetters.
|
|
2427
|
+
includedGematriaValues.add(value);
|
|
2428
|
+
includedLetters.push({ latinLetterId, value, hebrewLetterId: mapping.id, isVowel: isVowel(letter) });
|
|
2429
2429
|
if (isVowel(letter)) {
|
|
2430
2430
|
vowelsSum += value;
|
|
2431
2431
|
} else {
|
|
@@ -2433,7 +2433,7 @@ var calculateGematria = (word, options = {}, tree) => {
|
|
|
2433
2433
|
}
|
|
2434
2434
|
}
|
|
2435
2435
|
}
|
|
2436
|
-
if (options?.
|
|
2436
|
+
if (options?.calculateLetterPercentages) {
|
|
2437
2437
|
const letterCount = letters.length;
|
|
2438
2438
|
let vowelsCount = 0;
|
|
2439
2439
|
let consonantsCount = 0;
|
|
@@ -2455,27 +2455,29 @@ var calculateGematria = (word, options = {}, tree) => {
|
|
|
2455
2455
|
const synthesisReduction = reduceToSingleDigitWithSteps(
|
|
2456
2456
|
vowelsSum + consonantsSum
|
|
2457
2457
|
);
|
|
2458
|
-
const
|
|
2459
|
-
if (options?.
|
|
2458
|
+
const missingGematriaValues = [];
|
|
2459
|
+
if (options?.calculateMissingGematriaValues) {
|
|
2460
2460
|
for (const hebrewLetter of Object.values(HEBREW_LETTERS)) {
|
|
2461
2461
|
const hebrewLetterNode = tree.getNode(`letter:${hebrewLetter}`);
|
|
2462
2462
|
if (!hebrewLetterNode?.data) {
|
|
2463
2463
|
continue;
|
|
2464
2464
|
}
|
|
2465
|
-
if (!
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2465
|
+
if (!includedGematriaValues.has(hebrewLetterNode.data.gematriaValue)) {
|
|
2466
|
+
missingGematriaValues.push({
|
|
2467
|
+
value: hebrewLetterNode.data.gematriaValue,
|
|
2468
|
+
hebrewLetter,
|
|
2469
|
+
whenEnding: false
|
|
2469
2470
|
});
|
|
2470
2471
|
}
|
|
2471
|
-
if (hebrewLetterNode.data.gematriaValueWhenEnding && !
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2472
|
+
if (hebrewLetterNode.data.gematriaValueWhenEnding && !includedGematriaValues.has(hebrewLetterNode.data.gematriaValueWhenEnding)) {
|
|
2473
|
+
missingGematriaValues.push({
|
|
2474
|
+
value: hebrewLetterNode.data.gematriaValueWhenEnding,
|
|
2475
|
+
hebrewLetter,
|
|
2476
|
+
whenEnding: true
|
|
2475
2477
|
});
|
|
2476
2478
|
}
|
|
2477
2479
|
}
|
|
2478
|
-
|
|
2480
|
+
missingGematriaValues.sort((a, b) => a.value - b.value);
|
|
2479
2481
|
}
|
|
2480
2482
|
return {
|
|
2481
2483
|
vowels: {
|
|
@@ -2494,8 +2496,8 @@ var calculateGematria = (word, options = {}, tree) => {
|
|
|
2494
2496
|
finalValue: synthesisReduction.finalValue
|
|
2495
2497
|
},
|
|
2496
2498
|
includedLetters,
|
|
2497
|
-
|
|
2498
|
-
letterPercentages: options?.
|
|
2499
|
+
missingGematriaValues: options?.calculateMissingGematriaValues ? missingGematriaValues : void 0,
|
|
2500
|
+
letterPercentages: options?.calculateLetterPercentages ? letterPercentages : void 0
|
|
2499
2501
|
};
|
|
2500
2502
|
};
|
|
2501
2503
|
// Annotate the CommonJS export names for ESM import in node:
|