Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
nutrition
Advanced tools
Readme
Simple nutrition facts wrapper as an NPM module.
npm install nutrition --save
// import for ES6
import * as nutrition from 'nutrition'
const opts = {
weight: 65,
height: 1.75
}
const value = nutrition.bmi(opts)
// OR import for ES5
var nutrition = require('nutrition')
var opts = {
weight: 65,
height: 1.75
}
var value = nutrition.bmi(opts)
bmi(opts)
BMI (Body Mass Index) is a measurement of body fat based on height and weight that applies to both men and women. It can be used to indicate if you are overweight, obese, underweight or normal.
opts
is an object with properties containing formula values
The following arguments are expected:
bmiClass(bmi)
Returns the class from Body Mass Index value. Possible results are:
bmr(opts)
BMR (Basal Metabolic Rate) is the amount of energy expended while at rest in a neutrally temperate environment.
opts
is an object with properties containing formula values
The following arguments are expected:
dailyCalories(opts)
This method also know as the Harris–Benedict equation is a method used to estimate individual's daily kilocalorie requirements based on a basal metabolic rate (BMR).
opts
is an object with properties containing formula values
The following arguments are expected:
Please see CONTRIBUTING.
MIT, see LICENSE.
FAQs
Simple nutrition facts wrapper
The npm package nutrition receives a total of 10 weekly downloads. As such, nutrition popularity was classified as not popular.
We found that nutrition demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.