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.
- Host: GitHub
- URL: https://github.com/fireyy/bytes-util
- Owner: fireyy
- Created: 2017-11-29T04:03:15.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T04:13:59.000Z (over 3 years ago)
- Last Synced: 2025-10-04T03:43:04.135Z (10 months ago)
- Language: TypeScript
- Size: 475 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
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
```