# bytes-extra

> Extend the package 'bytes' to directly perform conversion between units

Latest version **2.0.1** (published 2017-09-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install bytes-extra
pnpm add bytes-extra
yarn add bytes-extra
bun add bytes-extra
```

## 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 | 2.0.1 |
| Published | 2017-09-10 |
| First published | 2017-09-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | MomoCow |
| Maintainers | momocow |
| Keywords | bytes, conversion |

## Links

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

## Dependencies (1)

- [bytes](https://npm.io/package/bytes.md) ^3.0.0

## Recent versions

- 2.0.1 (latest) — 2017-09-10
- 2.0.0 — 2017-09-10
- 1.0.0 — 2017-09-10

## README

# bytes-extra
Extend the package 'bytes' to directly  perform conversion between units

# Installation
- `npm install bytes-extra --save`

# Usage
All functions from the original package `bytes` are available.
```
const bytes = require('bytes-extra')

// as usual
bytes(1024)                  //'1KB'
bytes()                      // null
bytes('1GB')                 // 1073741824
```
If a string is provided as the first argument and the second argument `options` contains `unit` field, an string is returned as the unit conversion result.  
```
bytes('1GB', {unit: 'MB'})   //'1024MB'
```

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