arrbuffstr
Version:
Creates Strings from ArrayBuffers and viceversa in NodeJS and the Browser
65 lines (46 loc) • 1.26 kB
Markdown
<div align="center">
<img
src="https://raw.githubusercontent.com/estebanborai/arrbuffstr/master/docs/icon.png"
height="120"
width="120"
/>
<h1>ArrBuffStr</h1>
<small>ArrayBuffer - String</small>
<br />
<span>Creates Strings from ArrayBuffers and viceversa in NodeJS and the Browser</span>
</div>
```sh
npm install arrbuffstr
yarn add arrbuffstr
```
```js
import ArrBuffStr from 'arrbuffstr';
const { toArrayBuffer, toString } = ArrBuffStr();
// [object ArrayBuffer]
const arrbuff = toArrayBuffer('hello');
// 'hello'
const str = toString(arrbuff);
```
This package makes use of GitHub Actions for publishing new versions to NPM.
The wofklow is triggered when new releases prefixed with `v` are pushed to
GitHub.
First bump the current version using `npm` as follows:
```sh
npm version major
npm version minor
npm version patch
```
Then push the repository including tag metadata as follows
```sh
git push origin main --follow-tags
```
Any contribution is welcome! Feel free to open a PR or an issue.