Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
life-expectancy
Advanced tools
Life expectancy of humans across the global.
$ npm install --save life-expectancy
const lifeExpectancy = require('life-expectancy');
lifeExpectancy('India');
/*
[ { both: 68.3,
country: 'India',
female: 69.9,
male: 66.9,
rank: 125 } ]
*/
lifeExpectancy('in');
/*
[ { both: 68.3,
country: 'India',
female: 69.9,
male: 66.9,
rank: 125 } ]
*/
lifeExpectancy('Sao Tome and Principe');
/*
[ { both: 67.5,
country: 'Sao Tome and Principe',
female: 69.4,
male: 65.6,
rank: 127 } ]
*/
Type: string
Country code or Country name.
[ { both: 68.3,
country: 'India',
female: 69.9,
male: 66.9,
rank: 125 } ]
In the above response, here is what the keys represent:
both => Life expectancy of both the genders.
country => Yes, it's what you are thinking.
female => female life expectancy in human years.
male => male life expectancy in human years.
rank => Out of all the countires in the world, where does this coutnry stand in terms of life expectancy, lesser the rank higher the life expectancy.
P.S: The data is parsed from World Health Statistics 2016.
MIT © Hemanth.HM
FAQs
Life expectancy of humans across the global.
The npm package life-expectancy receives a total of 1 weekly downloads. As such, life-expectancy popularity was classified as not popular.
We found that life-expectancy 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
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.