Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
A Body Mass Index calculator.
var calcBmi = require('bmi-calc')
// 154 lbs, 72 in, imperial
console.log( calcBmi(154, 72, true) )
// { value: 20.88, name: 'Normal' }
// 69 kg, 1.62 m, metric
console.log( calcBmi(69, 1.62, false) )
// { value: 26.29, name: 'Overweight' }
// 59 kg, 2 m, metric
console.log( calcBmi(59, 2) )
// { value: 14.75, name: 'Very Severely Underweight' }
var calcBmi = require('bmi-calc')
var bmi = calcBmi(weight, height, [imperial])
weight
is a number in pounds or kilogramsheight
is a number in inches or metersimperial
is an optional boolean that defaults to false
.
true
, weight
is interpreted as pounds, and height
as inches.false
, weight
is interpreted as kilograms, and height
as meters.bmi
bmi
is an object with the following properties:
value
is the bmi number, e.g. 21.36
name
is a human-readable string, e.g. 'severely underweight'
npm install -g bmi-calc
bmi-calc --weight 170 --height 73
. (Except put in your weight and height.)Usage: bmi-calc OPTIONS
-h 64, --height=64 specify height in inches
-f 5, --feet=5 specify height in feet (can be used with -i)
-i 4, --inches=4 specify height in inches (can be used with -f)
-w 153, --weight=153 specify weight in pounds
-l 153, --lbs=153 specify weight in pounds
-p 153, --pounds=153 specify weight in pounds
MIT
FAQs
Calculates Body Mass Index
We found that bmi-calc 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.