UNPKG

better-npm-init

Version:

A better version of npm init, with templates and more. Usage: better-npm-init <template> [--yarn] [--install] [--git] [--yes] [--help]

15 lines (10 loc) 221 B
var throttle = require('./'); function onprogress(n) { console.log('progress %s%', n); } onprogress = throttle(onprogress, 500); var n = 0; setInterval(function(){ if (n >= 100) return; onprogress(n++); }, 50);