Socket
Socket
Sign inDemoInstall

@sindresorhus/df

Package Overview
Dependencies
1
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.1.0

12

index.js

@@ -32,2 +32,4 @@ 'use strict';

}
throw new Error(`The specified filesystem \`${name}\` doesn't exist`);
});

@@ -41,3 +43,11 @@ };

return run(['-kP', file]).then(data => data[0]);
return run(['-kP', file])
.then(data => data[0])
.catch(err => {
if (/No such file or directory/.test(err.message)) {
err = new Error(`The specified file \`${file}\` doesn't exist`);
}
throw err;
});
};

2

package.json
{
"name": "@sindresorhus/df",
"version": "2.0.0",
"version": "2.1.0",
"description": "Get free disk space info from `df -kP`",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -5,3 +5,3 @@ # df [![Build Status](https://travis-ci.org/sindresorhus/df.svg?branch=master)](https://travis-ci.org/sindresorhus/df)

Works on any Unix based system like OS X and Linux.
Works on any Unix based system like macOS and Linux.

@@ -8,0 +8,0 @@ *Created because all the other `df` wrappers are terrible. This one uses simple and explicit parsing. Uses `execFile` rather than `exec`. Ensures better platform portability by using the `-P` flag. Returns sizes in bytes instead of kilobytes and the capacity as a float.*

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc