Skip to content

coderaiser/trammel

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Trammel License NPM version Dependency Status 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