
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
jsdf is published on npm
npm install --save jsdf
const df = require('jsdf');
df('.', (err, out) => {
console.log(out);
});
Should produce output (depending on your filesystem) similar to:
{ '/':
{ filesystem: '/dev/sda1',
blocks: 245084444,
used: 54700392,
available: 177864784,
fill: 0.24 } }
jsdf module exports single function
options argument is optional. If it's omitted df will return statistics for all available
file systems, with default formatting. If argument is a string, it will be considered as a path
specifying filesystem to be checked.
Otherwise jsdf expects an object with following optional parameters:
| Option | Type | Description |
|---|---|---|
| path | String | Path passed to df, command specifying filesystem to be checked |
| base | String | Base size unit used for output formatting. Can be G, M or K (GB, MB or KB - default) |
| decimals | Number | Number of decimal places for output size rounding |
done is a callback function that will be invoked with formatted output of df command. Expected
signature follows a standard error first pattern: done(error, output). If no error occurred,
output should be a dictionary object with following structure:
| Type | Description | |
|---|---|---|
| key | String | Mounting point of a filesystem |
| value | Object | Details of the filesystem size |
| value.filesystem | String | Filesystem name |
| value.blocks | Number | Total size of filesystem blocks (unit depends on formatting) |
| value.used | Number | Size of used filesystem blocks (unit depends on formatting) |
| value.available | Number | Size of available filesystem blocks (unit depends on formatting) |
| value.fill | Number | Filesystem fill ratio |
df({path: '.', base: 'G', decimals: '3'}, (err, out) => {
console.log(out);
});
FAQs
Wrapper for unix df command
We found that jsdf demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.