wadjet

5.0.0 • Public • Published

tested with jest Coverage Status wercker status npm version npm download

👁️‍🗨️ Wadjet

🔮🎂 The your birth date is based on statistical psychology and will expose your personality. This package as a module does its calculations.

Install

Using yarn

$ yarn add wadjet

Using npm

$ npm install --save wadjet

Usage

import wadjet from 'wadjet';
 
const personality = wadjet.personality('2007-08-31');
console.log(typeof personality); // object
console.log(JSON.stringify(personality, null, 4)); // See: Result 1
 
const inner = wadjet.detail(result.inner);
console.log(typeof inner); // object
console.log(JSON.stringify(inner, null, 4)); // See: Result 2
 
const team = wadjet.bizTeam(inner.business, result.inner, inner.position);
console.log(typeof team); // object
console.log(JSON.stringify(team, null, 4)); // See: Result 3

Result

1

{
    "cycle": 4,
    "inner": "E919",
    "lifeBase": "Investment",
    "outer": "A888",
    "potential": "Io-Ei",
    "workstyle": "E001"
}

2

{
    "brain": "Right",
    "communication": "Fix",
    "management": "Hope",
    "response": "Action",
    "position": "Quick",
    "motivation": "Competition",
    "romance": {
        "A000": 2,
        "A024": 0,
        "A100": 0,
        "A888": 1,
        "E001": 1,
        "E125": 2,
        "E555": 0,
        "E919": 3,
        "H012": 3,
        "H025": 1,
        "H108": 2,
        "H789": 1
    },
    "business": {
        "A000": 2,
        "A024": 0,
        "A100": 0,
        "A888": 3,
        "E001": 2,
        "E125": 2,
        "E555": 2,
        "E919": 0,
        "H012": 1,
        "H025": 0,
        "H108": 3,
        "H789": 3
    }
}

3

{
    "Direct": "H789",
    "Brain": "H108",
    "Adjust": "E125"
}

Dependencies

  • nodejs >= 4.8.3
  • yarn (Optional, but recommended)

The Wadjet consists pure JS only, it's not dependent on a architecture.

APIs

Import

import wadjet from 'wadjet';

If you want the CommonJS style notation:

const wadjet = require('wadjet').default;

wadjet.bizTeam

Create personality types list of best affinitic for team.

wadjet.bizTeam(business: Object.<string, number>, personality: string, position?: string) -> Object.<string, string>
  • business: Good business formation levels.
  • personality: Personality type.
  • position: Position type. Optional.

wadjet.comparator

Create evaluation function used for sorting in affinity order.

wadjet.comparator(type: String) -> (a: String, b: String) -> -1 | 0 | 1
  • type: Personality type.

wadjet.detail

Get the details corresponding to the specified personality.

wadjet.detail(key: String) -> {
    brain: String,
    communication: String,
    management: String,
    motivation: String,
    response: String,
    position: String,
    romance: Object.<string, number>,
    business: Object.<string, number>
}
  • key: Personality type.

wadjet.personality

Get personality from birthday.

wadjet.personality(birth: Date | String) -> {
    cycle: Number,
    inner: String,
    lifeBase: String,
    outer: String,
    potential: String,
    workstyle: String
}

wadjet.types

Personality types list.

wadjet.types -> ReadonlyArray<String>
  • birth: Birthday. It can be set from 1873-02-01 to 2050-12-31.

Migrate

from 1.x.x

  1. s/wadjet\(/wadjet.calc(/g
  2. s/require\('wadjet'\);/require('wadjet').default;/g

from 2.x.x

  1. s/require\('wadjet'\);/require('wadjet').default;/g

from 3.x.x

Although wadjet.calc function was no longer, it can be replaced with the following code:

const calc =
    birth =>
        (({ inner, outer, ...result }) => ({
            inner: wadjet.detail(inner),
            outer: wadjet.detail(outer),
            ...result
        }))(wadjet.personality(birth));
 
const result = calc(new Date('2007-08-31'));

See also

Package Sidebar

Install

npm i wadjet

Weekly Downloads

11

Version

5.0.0

License

MIT

Unpacked Size

48.4 kB

Total Files

26

Last publish

Collaborators

  • danmaq