# trammel

> Get size of directory

Latest version **6.0.2** (published 2024-03-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install trammel
pnpm add trammel
yarn add trammel
bun add trammel
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 6.0.2 |
| Published | 2024-03-18 |
| First published | 2014-06-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=18 |
| Dependencies | 2 |
| Unpacked size | 7.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | coderaiser |
| Maintainers | coderaiser |

## Links

- npm: https://www.npmjs.com/package/trammel
- Repository: https://github.com/coderaiser/trammel
- Homepage: http://github.com/coderaiser/trammel
- Issues: https://github.com/coderaiser/trammel/issues
- npm.io page: https://npm.io/package/trammel

## Dependencies (2)

- [format-io](https://npm.io/package/format-io.md) ^2.0.0
- [try-to-catch](https://npm.io/package/try-to-catch.md) ^3.0.0

## Recent versions

- 6.0.2 (latest) — 2024-03-18
- 6.0.1 — 2024-03-18
- 6.0.0 — 2024-03-18
- 5.0.0 — 2021-01-19
- 4.0.0 — 2020-04-26
- 3.0.1 — 2019-09-20
- 3.0.0 — 2019-09-20
- 2.1.0 — 2019-04-01
- 2.0.1 — 2018-06-25
- 2.0.0 — 2018-06-12
- 1.0.2 — 2014-11-24
- 1.0.1 — 2014-11-20
- 1.0.0 — 2014-11-19
- 0.9.6 — 2014-10-17
- 0.9.5 — 2014-06-26
- … 3 more at https://npm.io/package/trammel/versions

## README

# Trammel [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL]

[NPMIMGURL]: https://img.shields.io/npm/v/trammel.svg?style=flat
[BuildStatusURL]: https://github.com/coderaiser/trammel/actions?query=workflow%3A%22Node+CI%22 "Build Status"
[BuildStatusIMGURL]: https://github.com/coderaiser/trammel/workflows/Node%20CI/badge.svg
[LicenseIMGURL]: https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat
[NPMURL]: https://npmjs.org/package/trammel "npm"
[LicenseURL]: https://tldrlegal.com/license/mit-license "MIT License"

Get directory size.

If you want get realtime size updates use [dirsize](https://github.com/coderaiser/node-dirsize).

## Example

```js
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

---
_Source: https://npm.io/package/trammel · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
