macos-progress
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

node-macos-progress

A node package for update file progress on macOS

NPM

Example

const macProgress = require('macos-progress');
const p = new macProgress.FileProgress('/Users/wsy/Downloads/text.txt', 100);
let current = 0;
const flag = setInterval(() => {
  console.log('update...', p);
  current += 10;
  p.update(current);
  if (current === 100) {
    clearInterval(flag);
  }
}, 1000);
 

TODO

  • Callback when user cancel a progress.
  • Support progress.cancel or progress.unpublish
  • Can get current complete unit count from progress.
  • Persist progress when application is quit.

Package Sidebar

Install

npm i macos-progress

Weekly Downloads

0

Version

0.1.3

License

MIT

Unpacked Size

26.4 kB

Total Files

28

Last publish

Collaborators

  • 0nese7en