How to use @sindresorhus/df - 3 common examples

To help you get started, we’ve selected a few @sindresorhus/df examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github node-honeycomb / honeycomb-server / lib / admin / single_api / system.js View on Github external
function getDiskInfo(cb) {
  let dfs = {};
  df.file(config.serverRoot).then((data) => {
    delete data.mountpoint;
    dfs.serverRoot = data;
    return df.file(config.logsRoot);
  }).then((data) => {
    delete data.mountpoint;
    dfs.logsRoot = data;
    cb(null, dfs);
  }).catch(cb);
}
github node-honeycomb / honeycomb-server / lib / admin / single_api / system.js View on Github external
df.file(config.serverRoot).then((data) => {
    delete data.mountpoint;
    dfs.serverRoot = data;
    return df.file(config.logsRoot);
  }).then((data) => {
    delete data.mountpoint;
github goto-bus-stop / statusbar / packages / diskusage / index.js View on Github external
run (b, options) {
    df.fs(options.fs).then((fs) => {
      b.update(`${options.label || fs.mountpoint} ${bytes(fs.available)}`)
    })
  }
})

@sindresorhus/df

Get free disk space info from `df -kP`

MIT
Latest version published 3 years ago

Package Health Score

56 / 100
Full package analysis

Popular @sindresorhus/df functions