sun-sign

1.0.4 • Public • Published

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'] 

Package Sidebar

Install

npm i sun-sign

Weekly Downloads

2

Version

1.0.4

License

MIT

Unpacked Size

5.33 kB

Total Files

4

Last publish

Collaborators

  • kagwave