https://github.com/bikossor/snakebyte
JavaScript library to convert between different byte units
https://github.com/bikossor/snakebyte
byte byte-units convert converter
Last synced: 9 months ago
JSON representation
JavaScript library to convert between different byte units
- Host: GitHub
- URL: https://github.com/bikossor/snakebyte
- Owner: Bikossor
- License: mit
- Created: 2018-11-17T22:50:29.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-07-09T19:42:53.000Z (almost 2 years ago)
- Last Synced: 2025-02-24T12:12:08.777Z (over 1 year ago)
- Topics: byte, byte-units, convert, converter
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/snakebyte
- Size: 2.08 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# snakebyte
Convert between different byte units
[](https://github.com/Bikossor/snakebyte/actions/workflows/node.js.yml)




## Installation
### Node.js environment
```
npm i snakebyte
```
### Browser environment
Download the latest version of snakebyte [here](https://github.com/Bikossor/snakebyte/releases/latest).
## Usage
### Node.js environment
```javascript
const { snakebyte } = require("snakebyte");
const kilobyteToMegabyte = snakebyte({
from: "Kilobyte", // optional, defaults to "Byte"
to: "Megabyte",
fractions: 2, // optional, defaults to 3
});
kilobyteToMegabyte(1000);
// => 1
```
## Contributing
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
## Versioning
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags](https://github.com/bikossor/snakebyte/tags) on this repository.
## Authors
- [Bikossor](https://github.com/Bikossor)
See also the list of [contributors](https://github.com/bikossor/snakebyte/contributors) who participated in this project.
## License
This project is licensed under the MIT License - see [here](LICENSE) for more details.