# stat-size

> Promise that returns the size of a file or directory.

Latest version **1.0.2** (published 2021-01-09) · 0 weekly downloads

## Install

```sh
npm install stat-size
pnpm add stat-size
yarn add stat-size
bun add stat-size
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-01-09 |
| First published | 2021-01-06 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jaid |
| Maintainers | jaid |
| Keywords | bytes, directory, disk, file, folder, fs, node, node-js, promise, size, utility, volume |

## Links

- npm: https://www.npmjs.com/package/stat-size
- Repository: https://github.com/jaid/stat-size
- Homepage: https://github.com/Jaid/stat-size
- Issues: https://github.com/jaid/stat-size/issues
- npm.io page: https://npm.io/package/stat-size

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2021-01-09
- 1.0.1 — 2021-01-06
- 1.0.0 — 2021-01-06

## README

# stat-size


<a href="https://raw.githubusercontent.com/jaid/stat-size/master/license.txt"><img src="https://img.shields.io/github/license/jaid/stat-size?style=flat-square" alt="License"/></a> <a href="https://github.com/sponsors/jaid"><img src="https://img.shields.io/badge/<3-Sponsor-FF45F1?style=flat-square" alt="Sponsor stat-size"/></a>  
<a href="https://actions-badge.atrox.dev/jaid/stat-size/goto"><img src="https://img.shields.io/endpoint.svg?style=flat-square&url=https%3A%2F%2Factions-badge.atrox.dev%2Fjaid%2Fstat-size%2Fbadge" alt="Build status"/></a> <a href="https://github.com/jaid/stat-size/commits"><img src="https://img.shields.io/github/commits-since/jaid/stat-size/v1.0.2?style=flat-square&logo=github" alt="Commits since v1.0.2"/></a> <a href="https://github.com/jaid/stat-size/commits"><img src="https://img.shields.io/github/last-commit/jaid/stat-size?style=flat-square&logo=github" alt="Last commit"/></a> <a href="https://github.com/jaid/stat-size/issues"><img src="https://img.shields.io/github/issues/jaid/stat-size?style=flat-square&logo=github" alt="Issues"/></a>  
<a href="https://npmjs.com/package/stat-size"><img src="https://img.shields.io/npm/v/stat-size?style=flat-square&logo=npm&label=latest%20version" alt="Latest version on npm"/></a> <a href="https://github.com/jaid/stat-size/network/dependents"><img src="https://img.shields.io/librariesio/dependents/npm/stat-size?style=flat-square&logo=npm" alt="Dependents"/></a> <a href="https://npmjs.com/package/stat-size"><img src="https://img.shields.io/npm/dm/stat-size?style=flat-square&logo=npm" alt="Downloads"/></a>

**Promise that returns the size of a file or directory.**





## Installation

<a href="https://npmjs.com/package/stat-size"><img src="https://img.shields.io/badge/npm-stat--size-C23039?style=flat-square&logo=npm" alt="stat-size on npm"/></a>

```bash
npm install --save stat-size@^1.0.2
```

<a href="https://yarnpkg.com/package/stat-size"><img src="https://img.shields.io/badge/Yarn-stat--size-2F8CB7?style=flat-square&logo=yarn&logoColor=white" alt="stat-size on Yarn"/></a>

```bash
yarn add stat-size@^1.0.2
```

<a href="https://github.com/jaid/stat-size/packages"><img src="https://img.shields.io/badge/GitHub Packages-@jaid/stat--size-24282e?style=flat-square&logo=github" alt="@jaid/stat-size on GitHub Packages"/></a>  
(if [configured properly](https://help.github.com/en/github/managing-packages-with-github-packages/configuring-npm-for-use-with-github-packages))

```bash
npm install --save @jaid/stat-size@^1.0.2
```



## Example


```javascript
import statSize from "stat-size"

const result = statSize("pikachu_8x8.png")
```

Variable `result` will be:

```javascript
129
```

















## Development



Setting up:
```bash
git clone git@github.com:jaid/stat-size.git
cd stat-size
npm install
```
Testing:
```bash
npm run test:dev
```
Testing in production environment:
```bash
npm run test
```


## License
[MIT License](https://raw.githubusercontent.com/jaid/stat-size/master/license.txt)  
Copyright © 2020, Jaid \<jaid.jsx@gmail.com> (https://github.com/jaid)

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