dogyear

1.0.2 • Public • Published

DogYear

Use this module to convert human years for your pet into dog years, and reverse.

NPM

Human years to dog years

const dy = require('dogyear');

// The first parameter is the actual human years age of the dog, and the second is if you want to round the age or not.
console.log(dy.dogYear(7, true));
> 62

Dog years to human years

const dy = require('dogyear');

// The first parameter is the actual dog years age of the dog, and the second is if you want to round the age or not.
console.log(dy.reverseDogYear(71, true));
> 12

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

Mozilla Public License 2.0

Package Sidebar

Install

npm i dogyear

Weekly Downloads

2

Version

1.0.2

License

ISC

Unpacked Size

28.7 kB

Total Files

14

Last publish

Collaborators

  • eeoms