UNPKG

parity-factor

Version:

A Node.js package to fetch and calculate Purchasing Power Parity (PPP) conversion factors (GDP, LCU per international dollar) for any country using World Bank, Eurostat, and OECD data.

19 lines (15 loc) 412 B
#!/usr/bin/env node import { getParity } from "../index.js"; const code = process.argv[2]; if (!code) { console.error(" Please provide a currency code. Example: npx partityfactor INR"); process.exit(1); } getParity(code) .then((obj) => { console.log(JSON.stringify(obj, null, 2)); }) .catch((err) => { console.error("Error:", err.message); process.exit(1); });