I spend a few hours uploaded my first NPM modules, chinese-year, which returns the Chinese zodiac animals’ list, or, the name of a particular year. It’s a super simple package, but it’s the first NPM module I published. More on that, it has test cases I wrote with
npm install --save chinese-year
const chineseYear = require('chinese-year') chineseYear.years //=> ['Rat', 'Ox', ...] chineseYear.getAnimal(2000) //=> 'Dragon'
.getAnimal(year: number):string .year:array get zodiac animal name of a year number