An open API service indexing awesome lists of open source software.

https://github.com/fireyy/bytes-util

Bytes convert utils.
https://github.com/fireyy/bytes-util

Last synced: 7 months ago
JSON representation

Bytes convert utils.

Awesome Lists containing this project

README

          

# bytes-util

> Bytes covert utils.

## Getting started

```bash
npm install bytes-util
```

or

```bash
yarn add bytes-util
```

## API

### `parse`

```js
import bytesUtil from 'bytes-util'

bytesUtil.parse("20MB") // 20480
```

### `stringify`

```js
import bytesUtil from 'bytes-util'

bytesUtil.stringify(20480) // 20 MB
```