Socket
Socket
Sign inDemoInstall

inflation-cpi

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    inflation-cpi

Convert dollar amounts between years using BLS CPI figures


Version published
Weekly downloads
3
increased by200%
Maintainers
1
Install size
4.46 kB
Created
Weekly downloads
 

Readme

Source

inflation-cpi

Convert dollar amounts between years using BLS CPI figures

Sources

  • Annual CPI figures going from 1913 to 2015
  • The BLS inflation calculator
  • Example of how to calculate inflation using the CPI index

Installation

npm install inflation-cpi

Usage

var inflation = require("inflation-cpi");

// examples from http://www.usinflationcalculator.com/frequently-asked-questions-faqs/
var twenty_dollars_in_1980 = inflation(
	1980, // target year
	2011, // original year
	20     // amount
);
// 7.32

var movie_ticket_inflation = inflation(
	2011, // target year
	1970, // original year
	0.5     // amount
);
// 2.90

Keywords

FAQs

Last updated on 06 Jul 2016

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