Make importing great again! A parody package that imposes tariffs on Node.js requires.
npm install tariff-nodejsbash
npm install tariff-nodejs
`
Available on npm
Usage
`javascript
const tariff = require('tariff');
// Set your tariff rates (package_name: percentage)
tariff.set({
"lodash": 50, // 50% tariff on lodash
"express": 200, // 200% tariff on express
"axios": 150 // 150% tariff on axios
});
// Now when you require these packages, they'll be TARIFFED!
const lodash = require('lodash'); // This will be 50% slower
const express = require('express'); // This will be 200% slower
`
How It Works
When you require a package that has a tariff:
1. TARIFF measures how long the original require takes
2. TARIFF makes the require take longer based on your tariff percentage
3. TARIFF announces the tariff with a TREMENDOUS message
Example Output
`
JUST IMPOSED a 50% TARIFF on lodash! Original import took 45000 us, now takes 67500 us. American packages are WINNING AGAIN! #MIGA
``