kaabalah 1.0.5 → 1.1.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/dist/gematria/index.d.mts +11 -13
- package/dist/gematria/index.d.ts +11 -13
- package/dist/gematria/index.js +24 -21
- package/dist/gematria/index.js.map +1 -1
- package/dist/gematria/index.mjs +24 -21
- package/dist/gematria/index.mjs.map +1 -1
- package/dist/index.js +24 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -21
- 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
|
+
hebrewLetterId: 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
|
+
hebrewLetterId: 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,30 @@ 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
|
-
const
|
|
2461
|
+
const hebrewLetterId = `letter:${hebrewLetter}`;
|
|
2462
|
+
const hebrewLetterNode = tree.getNode(hebrewLetterId);
|
|
2462
2463
|
if (!hebrewLetterNode?.data) {
|
|
2463
2464
|
continue;
|
|
2464
2465
|
}
|
|
2465
|
-
if (!
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2466
|
+
if (!includedGematriaValues.has(hebrewLetterNode.data.gematriaValue)) {
|
|
2467
|
+
missingGematriaValues.push({
|
|
2468
|
+
value: hebrewLetterNode.data.gematriaValue,
|
|
2469
|
+
hebrewLetterId,
|
|
2470
|
+
whenEnding: false
|
|
2469
2471
|
});
|
|
2470
2472
|
}
|
|
2471
|
-
if (hebrewLetterNode.data.gematriaValueWhenEnding && !
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2473
|
+
if (hebrewLetterNode.data.gematriaValueWhenEnding && !includedGematriaValues.has(hebrewLetterNode.data.gematriaValueWhenEnding)) {
|
|
2474
|
+
missingGematriaValues.push({
|
|
2475
|
+
value: hebrewLetterNode.data.gematriaValueWhenEnding,
|
|
2476
|
+
hebrewLetterId,
|
|
2477
|
+
whenEnding: true
|
|
2475
2478
|
});
|
|
2476
2479
|
}
|
|
2477
2480
|
}
|
|
2478
|
-
|
|
2481
|
+
missingGematriaValues.sort((a, b) => a.value - b.value);
|
|
2479
2482
|
}
|
|
2480
2483
|
return {
|
|
2481
2484
|
vowels: {
|
|
@@ -2494,8 +2497,8 @@ var calculateGematria = (word, options = {}, tree) => {
|
|
|
2494
2497
|
finalValue: synthesisReduction.finalValue
|
|
2495
2498
|
},
|
|
2496
2499
|
includedLetters,
|
|
2497
|
-
|
|
2498
|
-
letterPercentages: options?.
|
|
2500
|
+
missingGematriaValues: options?.calculateMissingGematriaValues ? missingGematriaValues : void 0,
|
|
2501
|
+
letterPercentages: options?.calculateLetterPercentages ? letterPercentages : void 0
|
|
2499
2502
|
};
|
|
2500
2503
|
};
|
|
2501
2504
|
// Annotate the CommonJS export names for ESM import in node:
|