Socket
Socket
Sign inDemoInstall

calories-burnt

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    calories-burnt

Calculate the number of calories burnt from a run.


Version published
Weekly downloads
8
Maintainers
1
Install size
10.7 kB
Created
Weekly downloads
 

Readme

Source

calories-burnt

Calculate the number of calories burnt from a run.

Installation

npm i calories-burnt

Usage

import caloriesBurnt from 'calories-burnt';

caloriesBurnt({
    meters: 1000,
    slope: -0.015,
    treadmill: false,
    age: 23,
    restingHeartBeatsPerMinute: 80,
    kilograms: 80
}); // => 87

caloriesBurnt({meters, slope, treadmill?, age, restingHeartBeatsPerMinute, kilograms}) => number

Options:

  • meters: Distance run in meters, not factoring in altitude.
  • slope: The slope in percentage. -0.015 means that the run was downhill with a -1.5% slope.
  • treadmill: Whether the run was on a treadmill. Because there is no air resistance, fewer calories will be burnt. Optional. Default value: false.
  • age: The age of the runner.
  • restingHeartBeatsPerMinute: The resting heart heart beats per minute rate. Normal rate is between 60-100bpm. Athletes have a lower rate and therefore burn fewer calories.
  • kilograms: Weight of the runner in kilograms.

Contribution

Contributions welcome. Test suite can be run using npm test.

Author

Jonny Burger

License

© 2019 MIT

Credits

Keywords

FAQs

Last updated on 19 Feb 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc