Sign Teller is a library that provides information about zodiac signs.
Ever need to wish a friend happy birthday with their zodiac sign, say Happy Birthday, Gemini? then you need sign-teller
.
To use sign-teller
in your application as a dependency:
- yarn add
sign-teller
or npm installsign-teller
- Require (using CommonJS or ES6 modules) it in your application
- See the Usage section below
Sign Teller depends on a few pre-requisites:
- Node >= 6
tellSign
is a standalone utility library wrapped in a simple function and this function is also the library's main entry point.
Below is a demonstration of how to use this library
const tellSign = require('sign-teller'); // import signTeller from 'sign-teller' if you use ES6 modules
const dateOfBirth = { day: 4, month: 7 }
const signDetails = tellSign(dateOfBirth);
console.log(`Happy birthday, ${signDetails.sign}!`);
- tellSign(birthDate: { day: number, month: number }, type: string): Object
birthDate
must be an object with a day and month properties, signifying the birthday and the birth month respectivelytype
is 'sidereal' by default. Set it to 'tropical` if you want a zodiac interpretation based on the tropical calendar- Returns an object containing the following properties:
- from: string // the lower date interval of the sign
- to: string // the upper date interval of the sign
- sign: string // the name of the sign
- facts: Array
- elements: string // sign's element for e.g. fire
- luckyGem: string // Lucky gem for this sign. E.g. Topaz
- Run test by using
yarn test
This project is licensed under the MIT License - see the LICENSE.md file for details
Certain zodiac information was curated from the following sites: