@kabeep/zodiac-animals

zodiac-animals

đŸŧ A JavaScript zodiac animals utility library

NodeJS License NPM Codecov Codacy Badge CircleCI

English | įŽ€äŊ“中文

Insights

Considering tree-shaking and the rigor required due to cultural differences, the output will exclude i18n content.

A lite utility library using Lunar Calendar.

See documentation.

npm install @kabeep/zodiac-animals --save
yarn add @kabeep/zodiac-animals
pnpm add @kabeep/zodiac-animals
const { ANIMALS, zodiac, Zodiac: IZodiac } = require('@kabeep/zodiac-animals');
import { ANIMALS, zodiac, type Zodiac } from '@kabeep/zodiac-animals';

zodiac(new Date()) as Zodiac;
Parameter Type Optional Default Description
date Date No - Date Object of Gregorian Calendar

Result Object:

Key Type Required Description
name string true Zodiac Animal Name
mate string[] true Zodiac Animal Mates
traits string[] true Zodiac Animal Traits
alias string false Zodiac Animal i18n Alias
year number true Lunar Year of Date Input
month number true Lunar Month of Date Input
day number true Lunar Day of Date Input
isLeapMonth boolean true Lunar Leap Month Flag of Date Input
from Date true Gregorian Date of the First Day of the Lunar Year (Return an Invalid Date if an Exception Occurs)
to Date true Gregorian Date of the Last Day of the Lunar Year (Return an Invalid Date if an Exception Occurs)
  • lunar-date-fns - 🗓ī¸ A JavaScript lunar date utility library.
  • lunar-birthday-cli - 🎂 A Node.js Library to list the lunar birthday in terminal.
  • zodiacAnimals2 - Reference is made to data design of this repository.

Contributions via Pull Requests or Issues are welcome.

This project is licensed under the MIT License. See the LICENSE file for details.