Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/estebanborai/arrbuffstr
Creates Strings from ArrayBuffers and viceversa in NodeJS and the Browser
https://github.com/estebanborai/arrbuffstr
arraybuffer browser data node string transform
Last synced: 4 days ago
JSON representation
Creates Strings from ArrayBuffers and viceversa in NodeJS and the Browser
- Host: GitHub
- URL: https://github.com/estebanborai/arrbuffstr
- Owner: EstebanBorai
- License: mit
- Archived: true
- Created: 2020-05-22T01:38:36.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-01T20:00:36.000Z (over 1 year ago)
- Last Synced: 2024-09-06T13:40:09.788Z (29 days ago)
- Topics: arraybuffer, browser, data, node, string, transform
- Language: TypeScript
- Homepage:
- Size: 339 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ArrBuffStr
ArrayBuffer - String
Creates Strings from ArrayBuffers and viceversa in NodeJS and the Browser## Installation
```sh
# using npm
npm install arrbuffstr# using yarn
yarn add arrbuffstr
```## Usage
```js
import ArrBuffStr from 'arrbuffstr';const { toArrayBuffer, toString } = ArrBuffStr();
// [object ArrayBuffer]
const arrbuff = toArrayBuffer('hello');// 'hello'
const str = toString(arrbuff);
```## Releasing
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
# for versions with breaking changes use `major`
npm version major# for versions with non-breaking changes use `minor`
npm version minor# for patch versions use `patch`
npm version patch
```Then push the repository including tag metadata as follows
```sh
git push origin main --follow-tags
```## Contributions
Any contribution is welcome! Feel free to open a PR or an issue.