sun-sign
v1.0.4
Published
A package that gets the zodiac sign corresponding to a given date of birth.
Downloads
16
Maintainers
Readme
sun-sign
Use this module to find a sun sign based on a date of birth.
Installation
NPM:
npm install sun-sign
Yarn:
yarn add sun-sign
Usage
Import the package first.
import sunSign from 'sun-sign';
//or
const sunSign = require('sun-sign');
The required parameters are month and day, which can be in string or number format.
const sunSign = (month: string | number, day: string | number) => {
return {sign: sign, element: element}
}
//ex.
sunSign(08, 21); // {sign: 'leo', element: 'fire'}
You can get a list of sun signs by calling the function with no parameters.
const signs = sunSign();
console.log(signs); // ['aries', 'taurus', 'gemini', 'cancer', 'leo', 'virgo', 'libra', 'scorpio', 'sagittarius', 'capricorn', 'aquarius', 'pisces']