Get directory size.
If you want get realtime size updates use dirsize.
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;
MIT