2.1.1 • Published 4 years ago

tmutil-status v2.1.1

Weekly downloads
6
License
MIT
Repository
github
Last release
4 years ago

tmutil-status

Get macOS Time Machine status as a JS object

About

In macOS, the terminal command

tmutil status

will display the current status of Time Machine in the NextSTEP property list dictionary format. (See also: Time Machine progress from the command line.)

This package provides that information as a JavaScript object.

Install

npm install tmutil-status

Use

ESM import

import tmutilStatus from 'tmutil-status';

CommonJS import

const tmutilStatus = require('tmutil-status/commonjs');

Promise use

// async/await
(async () => {
  try {
    const data = await tmutilStatus();
    console.log(data);
  }
  catch (err) {
    console.error(err);
  }
})();

// chaining
tmutilStatus()
  .then(data => console.log(data))
  .catch(err => console.error(err));

Callback use

tmutilStatus((err, data) => {
  if (err) console.error(err);
  else console.log(data);
});
2.1.1

4 years ago

2.1.0

4 years ago

2.0.0

4 years ago

1.0.0

4 years ago