destiny-matrix-core
v0.1.1
Published
Destiny Matrix point and compatibility calculations.
Maintainers
Readme
destiny-matrix-core
Core Destiny Matrix point and compatibility calculations extracted from the Destiny Matrix calculator.
Homepage: https://destiny-matrix.cc/id/
Install
npm install destiny-matrix-coreUsage (ESM)
import { fromParts, fromDate, calculateCompatibility } from 'destiny-matrix-core';
const alice = fromParts(1, 1, 2000);
const bob = fromDate('1998-05-20');
const compatibility = calculateCompatibility(alice.points, bob.points);
console.log(compatibility.scores);Usage (CommonJS)
const { fromParts, fromDate, calculateCompatibility } = require('destiny-matrix-core');
const alice = fromParts(1, 1, 2000);
const bob = fromDate('1998-05-20');
const compatibility = calculateCompatibility(alice.points, bob.points);
console.log(compatibility.scores);Notes
reduceNumbermirrors the site logic: values above 22 are reduced once.fromDateaccepts aYYYY-MM-DDstring or aDateobject.- Invalid dates or non-finite inputs throw
RangeError.
