0.19.2 • Published 3 years ago

@kurone-kito/dantalion-core v0.19.2

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

🦁 Dantalion: Core library

npm version lerna

“Dantalion” is the seventy-first demon in the demonological grimoire, the Lesser Key of Solomon. He teaches all kinds of academic knowledge, but he can also read and manipulate others’ hearts.

If you can predict the other person’s character, you can increase the possibility of controlling the other person’s will. This package provides a function that infers the personality details from the specified birthday. By using this package, you can quickly implement birthday divination in your Node.js apps. Its calculation is using the method of Four Pillars of Destiny (Ba-Zi).

Note

  • OS independent and dependent free.
  • This package can specify a birthday within the range from February 1, 1873, to December 31, 2050.
  • This package does not consider time zones. If you are not satisfied with the inferred personality, moving the date back and forth may solve.

Usage

Require: Node.js >= v12

Add to dependency

npm install -S @kurone-kito/dantalion-core

Get the personality

const { getPersonality } = require('@kurone-kito/dantalion-core');

console.log(getPersonality('1993-10-09'));

Result

In strictly, The function gets the raw object, not the JSON.

{
  "cycle": 10,
  "inner": "555",
  "lifeBase": "application",
  "outer": "789",
  "potential": ["Io", "Ii"],
  "workStyle": "125"
}

Get detailed information on personality

const { getDetail } = require('@kurone-kito/dantalion-core');

console.log(getDetail('555'));

Result

In strictly, The function gets the raw object, not the JSON.

{
  "affinity": {
    "biz": {
      "100": 0,
      "108": 3,
      "125": 2,
      "555": 3,
      "789": 1,
      "888": 2,
      "919": 1,
      "000": 0,
      "001": 2,
      "012": 2,
      "024": 0,
      "025": 0
    },
    "love": {
      "100": 0,
      "108": 0,
      "125": 3,
      "555": 2,
      "789": 2,
      "888": 2,
      "919": 0,
      "000": 2,
      "001": 2,
      "012": 3,
      "024": 0,
      "025": 2
    }
  },
  "brain": "left",
  "communication": "fix",
  "management": "hope",
  "motivation": "skillUp",
  "position": "quick",
  "response": "action",
  "vector": "economically"
}

Get all types

All types list.

const { types } = require('@kurone-kito/dantalion-core');

console.log(types); // AllTypes Object

AllTypes

/** All types list. */
export interface AllTypes {
  readonly brain: readonly Brain[];
  readonly communication: readonly Communication[];
  readonly genius: readonly Genius[];
  readonly lifeBase: readonly LifeBase[];
  readonly lifeBaseCC: Record<LifeBase, string>;
  readonly management: readonly Management[];
  readonly motivation: readonly Motivation[];
  readonly position: readonly Position[];
  readonly potential: readonly Potential[];
  readonly potentialCC: Record<Potential, string>;
  readonly response: readonly Response[];
  readonly vector: readonly Vector[];
}
PropertyTypeDescription
brainreadonly Brain[]The list that the types of thought methods.
communicationreadonly Communication[]The list that the types of dialogue policy.
geniusreadonly Genius[]The list of personality types.
lifeBasereadonly LifeBase[]The list that the base of ego type.
lifeBaseCCRecord<LifeBase, string>The list that the base of ego type.
managementreadonly Management[]The list of the types that the risk management method.
motivationreadonly Motivation[]The list of the types that easy to the motivated environment.
positionreadonly Position[]The list of role types
potentialreadonly Potential[]The list of the types that the potential.
responsereadonly Response[]The list of the types that the role.
vectorreadonly Vector[]The list of personality types.

API

getDetail

type getDetail = (genius: Genius) => Detail | undefined;

Parameters

  • genius: The types of personality.

Returns

Detailed information on the personality. If the param is invalid, it will be undefined.

getPersonality

Get the personality information corresponding to the specified birthday.

type getPersonality = (
  birth: string | number | Date
) => Personality | undefined;

Parameters

  • birth: Specify a birthday within the range from February 1, 1873, to December 31, 2050. Ignore the time information.

Returns

The object that the personality information. If the date is over the range, it will be undefined.

toCC

type toCC = (personality: Personality) => string;

Parameters

  • personality: Specify the personality object.

Returns

The CC string.

Types (for TypeScript)

Affinity

The lists of affinity by genius type.

interface Affinity {
  biz: Record<Genius, AffinityLevel>;
  love: Record<Genius, AffinityLevel>;
}
PropertyTypeDescription
bizRecord<Genius, AffinityLevel>for business.
loveRecord<Genius, AffinityLevel>for romance.

AffinityLevel

Affinity level.

type AffinityLevel = 0 | 1 | 2 | 3;
KeyValue
0Hmm :/
1Good.
2Great!
3Fantastic!!!

Brain

The types of thought method.

type Brain = 'left' | 'right';
KeyValue
leftLeft brain type. Logical thinking is superior.
rightRight brain type. Intuitive thinking is superior.

Communication

The types of dialogue policy.

type Communication = 'fix' | 'flex';
KeyValue
fixThis type of person would like to find a way from the conclusion.
flexThis type of person would like to express conclude fluidly.

Detail

The detail for genius type.

interface Detail {
  affinity: Affinity;
  brain: Brain;
  communication: Communication;
  management: Management;
  motivation: Motivation;
  position: Position;
  response: Response;
  vector: Vector;
}
PropertyTypeDescription
affinityAffinityThe lists of affinity by genius type.
brainBrainThe types of thought method.
communicationCommunicationThe types of dialogue policy.
managementManagementThe types that the risk management method.
motivationMotivationThe types of easy to the motivated environment.
positionPositionThe types for role.
responseResponseThe types for role.
vectorVectorVector of genius type.

Genius

The types of personality.

type Genius =
  | '000'
  | '001'
  | '012'
  | '024'
  | '025'
  | '100'
  | '108'
  | '125'
  | '555'
  | '789'
  | '888'
  | '919';
KeyValue
000This type of person would like to be freedom. And also, They have a good imagination.
001This type of person would like to do something different from others with their ideas.
012This type of person will like new somethings. They also value discussions, especially.
024This type of person is good at turning anxiety into action. They have a strong memory.
025This type of person has a strong camaraderie. And also, they have a lot of friends.
100This type of person is serious and perfectionist. They expose weak point when praised.
108This type of person is shy and honest. And they have a strong sense of responsibility.
125This type of person can accept temporary abstinence to fulfill their long-term goals.
555This type of person is quick to learn and can do anything. Also, they are dignified.
789This type of person value experience and achievement. Also, they prefer to be quiet.
888This type of person value the spirit of challenge and are interested in various things.
919This type of person has the quick situational judgment and also is good at bargaining.

LifeBase

The types that the base of ego.

type LifeBase =
  | 'application'
  | 'association'
  | 'development'
  | 'expression'
  | 'finance'
  | 'investment'
  | 'organization'
  | 'quest'
  | 'selfMind'
  | 'selfReliance';
KeyCCValue
applicationGThis type of person would like to self-experience seriously.
associationIThis type of person would like to do it immediately when they think.
developmentDThis type of person would like to be perfectionists.
expressionCThis type of person would like to be honest with themselves.
financeEThis type of person would like to put everything within eye reach.
investmentFThis type of person would like to be a down-to-earth collector.
organizationHThis type of person would like to live as a member of a group.
questJThis type of person would like to learn from the wisdom of our pioneers.
selfMindBThis type of person would like to be a leader of the team.
selfRelianceAThis type of person would like to be a lone wolf.

Management

The types that the risk management method.

type Management = 'care' | 'hope';
KeyValue
careThis type of person has a good intuition for risk but weak for chance perception.
hopeThis type of person has a good intuition for great opportunities, but weak risk perception.

Motivation

The types of easy to the motivated environment.

type Motivation =
  | 'competition'
  | 'ownMind'
  | 'power'
  | 'safety'
  | 'skillUp'
  | 'status';
KeyValue
competitionThe environment that can be compared with other peoples.
ownMindThe environment that they can do on their plan.
powerThe environment that they can do as soon as they think about it.
safetyThe environment that they can pursue security and peace.
skillUpThe environment that daily improvement can be felt.
statusThe environment that they can be different from others.

Personality

The details for Personality.

interface Personality {
  cycle: number;
  inner: Genius;
  lifeBase: LifeBase;
  outer: Genius;
  potentials: [Potential, Potential];
  workStyle: Genius;
}
PropertyTypeDescription
cyclenumberThe sub-personality (cycle).
innerGeniusThe inner personality.
lifeBaseLifeBaseThe life base.
outerGeniusThe outer personality.
potentials[Potential, Potential]The potential.
workStyleGeniusThe personality at working.

Position

The types for role.

type Position = 'adjust' | 'brain' | 'direct' | 'quick';
KeyValue
adjustThis type of person can solve interpersonal problems.
brainThis type of person can create interesting ideas.
directThis type of person has all abilities little by little.
quickThis type of person has a lot of energy, like a salesperson.

Potential

The potential type definition that can exert when taking action.

type Potential =
  | 'Ci'
  | 'Co'
  | 'Ei'
  | 'Eo'
  | 'Fi'
  | 'Fo'
  | 'Ii'
  | 'Io'
  | 'Ni'
  | 'No';
keyCCValue
CijThis type of person is good at sublimating existing works with respect.
CoiThis type of person is skilled at exploring one thing. They also tend to an originator.
EidThis type of person is good at non-verbal and passive expression.
EocThis type of person is skilled at active expression through words.
FifThis type of person is relatively cautious and can see the meaning behind the numbers.
FoeThis type of person is good at using numbers and other evidence-based expressions.
IibThis type of person is a good listener and can draw out the other person's point.
IoaThis type of person is good at active and aggressive communication.
NihThis type of person has fine self-management skills and is good at maintaining organization.
NogThis type of person is very caring and good at developing organizations.

Response

The types for role.

type Response = 'action' | 'mind';
KeyValue
actionThis type of person would like to always act with customers.
mindThis type of person would like to always act with only known peoples.

Vector

Personality types.

type Vector = 'authority' | 'economically' | 'humanely';
KeyValue
authorityThis type of person would like to do the action for self-authority.
economicallyThis type of person would like to do the action to build their wealth.
humanelyThis type of person would like to do the action for self-virtue.

License

MIT

0.19.2

3 years ago

0.19.1

3 years ago

0.19.0

3 years ago

0.18.0

3 years ago

0.17.0

3 years ago

0.16.0

3 years ago

0.15.0

3 years ago

0.14.0

3 years ago

0.13.2

3 years ago

0.13.0

3 years ago

0.12.2

3 years ago

0.12.3

3 years ago

0.10.0

3 years ago

0.11.0

3 years ago

0.9.0

3 years ago

0.12.0

3 years ago

0.11.1

3 years ago

0.8.0

3 years ago

0.11.2

3 years ago

0.5.0

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.7.0

3 years ago

0.6.0

3 years ago

0.5.1

3 years ago

0.3.2

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago