npm.io
6.0.2 • Published 2 years ago

trammel

Licence
MIT
Version
6.0.2
Deps
2
Size
8 kB
Vulns
0
Weekly
0
Stars
5

Trammel License NPM version Build Status

Get directory size.

If you want get realtime size updates use dirsize.

Example

import trammel from 'trammel';

await trammel('.');
// returns
'58.47kb';

await trammel('.', {
    type: 'raw',
});

// returns
59_974;

await trammel('do not exist', {
    stopOnError: true,
});

// throws
Error;

License

MIT