# human-readable-bytes

> Convert bytes to a readable format (GB, MB, etc.)

Latest version **1.1.0** (published 2018-09-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install human-readable-bytes
pnpm add human-readable-bytes
yarn add human-readable-bytes
bun add human-readable-bytes
```

## 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 | 1.1.0 |
| Published | 2018-09-07 |
| First published | 2018-05-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Tyson Louth |
| Maintainers | tlouth19 |
| Keywords | file size, bytes |

## Links

- npm: https://www.npmjs.com/package/human-readable-bytes
- Repository: https://github.com/tlouth19/human-readable-bytes
- Homepage: https://github.com/tlouth19/human-readable-bytes#readme
- Issues: https://github.com/tlouth19/human-readable-bytes/issues
- npm.io page: https://npm.io/package/human-readable-bytes

## Recent versions

- 1.1.0 (latest) — 2018-09-07
- 1.0.2 — 2018-05-15
- 1.0.1 — 2018-05-11
- 1.0.0 — 2018-05-11

## README

# Human Readable Bytes
Convert bytes to a readable format (GB, MB, etc.)

## Installation

* `npm install human-readable-bytes --save`; or

* `yarn add human-readable-bytes`.

## Usage

```jsx
import convertBytesToHumanReadable from 'human-readable-bytes'

convertBytesToHumanReadable(bytes, method, decimals, space)
```
## Options

| Param | Description | Valid Options|
| ------ | ---------------- | ------------------------------------- |
| `bytes`| The bytes to convert | String/Integer|          
| `method`| File size calculation type | 1000 or 1024|
| `decimals`| Decimals to add to the file size | Integer |
| `space`| Add a space between file size and text (40GB vs. 40 GB) | Boolean |

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