Artificially increase the download-counter of any npm package!
Read more about this here.
$ npm install --save install-count-inflator
Requiring install-count-inflator
will return a class. Upon instantiation it will increment the download count of the
specified package every second.
var InstallInflator = require('install-count-inflator');
var inflator = new InstallInflator({
name: 'install-count-inflator',
});
Type: string
The name of the npm package.
Type: function
A function to be called whenever the download count gets increased.
Default: function() {}
var InstallInflator = require('install-count-inflator');
var inflator = new InstallInflator({
name: 'install-count-inflator',
onPing: function(timesPinged) {
console.log('The download count has been incremented ' + timesPinged + ' times!');
}
});
Type number
The amount of time to wait between pings in milliseconds
Default: 1000
Type string
The version of the package.
Default: '1.0.0'
Type string
The scope of the npm package if it is scoped
Default: null
var InstallInflator = require('@caltrop/install-count-inflator');
var inflator = new InstallInflator({
name: 'install-count-inflator',
version: '1.0.0',
scope: 'caltrop'
});
Stops the interval, optionally takes an amount of time in milliseconds to wait before stopping.
The example below increases the download count of this package once every 250 milliseconds and automatically stops after 10 seconds:
var InstallInflator = require('install-count-inflator');
var inflator = new InstallInflator({
name: 'install-count-inflator',
delay: 250
});
inflator.stop(10 * 1000);
This demo is licensed under the GNU General Public License v3.0. You may copy, distribute and modify the software as long as you track changes/dates in source files. Any modifications to this project must be made available under the GPL along with build & install instructions.