ciphers-gematria
v2.0.2
Published
gematria calculator (Ordinal, Sumerian, Chaldean, Primes, etc.)
Downloads
19
Maintainers
Readme
Ciphers Gematria
Ciphers Gematria is a JavaScript package for calculating gematria values using multiple systems (Ordinal, Sumerian, Chaldean, Latin, Satanic, Fibonacci, and more).
It supports ESM, is tree-shakable, and allows users to import all ciphers at once or just a single cipher.
🚀 Installation
npm install ciphers-gematria
# or with yarn
yarn add ciphers-gematria⚡ Quick start
import { ciphers } from 'ciphers-gematria'; // ESM
const gematria = require('ciphers-gematria'); // CJS
const result = ciphers("hello"); // ESM
const result = gematria.ciphers("hello"); // CJS
console.log(result);
// Output:
{
Ordinal: 52,
Reduction: 25,
ReverseOrdinal: 83,
ReverseReduction: 20,
Standard: 133,
Latin: 103,
Sumerian: 312,
ReverseSumerian: 498,
CapitalsMixed: 104,
CapitalsAdded: 52,
ReverseCapsMixed: 166,
ReverseCapsAdded: 83,
ReverseStandard: 650,
Satanic: 227,
ReverseSatanic: 258,
SingleReduction: 25,
KvException: 25,
SkvException: 25,
ReverseSingleReduction: 29,
EpException: 38,
EhpException: 47,
Primes: 151,
Trigonal: 327,
Squares: 602,
Fibonacci: 458,
ReversePrimes: 277,
ReverseTrigonal: 761,
ReverseSquares: 1439,
Chaldean: 23,
Septenary: 17,
Keypad: 23
}Calculate a single cipher
ESM
♻️ Only the imported cipher will be included in your final bundle.
import { sumerian, latin, chaldean } from 'ciphers-gematria';
console.log(sumerian('hello')); // 312
console.log(chaldean('hello')); // 23CJS
const gematria = require('ciphers-gematria');
console.log(gematria.latin('hello')); // 103
console.log(gematria.chaldean('hello')); // 23🛠️ Create a custom cipher
createCipher is a function: it returns a new cipher function based on a custom letter-value table.
ESM
import { createCipher } from 'ciphers-gematria';
const mySpecialTable = {
A: 251, B: 101, C: 45, D:150 ...... Z:42
};
const myCustomCipher = createCipher(mySpecialTable);
console.log(myCustomCipher('hello'));
CJS
const gematria = require('ciphers-gematria');
const mySpecialTable = {
A: 251, B: 101, C: 45, D:150 ...... Z:42
};
const myCustomCipher = gematria.createCipher(mySpecialTable);
console.log(myCustomCipher('hello')); 📚 Available ciphers
🤝Contribution
Contributions are welcome! If you’d like to add a new cipher.
Fork the repository and create a pull request
