🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

byte-encoder

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

byte-encoder - npm Package Compare versions

Comparing version

to
1.0.3

4

index.js

@@ -166,6 +166,2 @@

encodeToBuffer (string = '') {
return new ByteView(new ByteEncoderIterator(string)).buffer
}
encode (string = '') {

@@ -172,0 +168,0 @@ return new ByteView(new ByteEncoderIterator(string))

2

package.json
{
"name": "byte-encoder",
"version": "1.0.2",
"version": "1.0.3",
"description": "Encode data to utf8 bytes. Browser or NodeJS.",

@@ -5,0 +5,0 @@ "type": "module",

@@ -80,15 +80,1 @@

```
### (method) `ByteEncoder.encodeToBuffer`:
Args [`string: string`]
```js
import ByteEncoder from 'byte-encoder'
const byteEncoder = new ByteEncoder()
console.log(byteEncoder.encodeToBuffer('Hello World!'))
// prints: ArrayBuffer { [Uint8Contents]: <48 65 6c 6c 6f 20 57 6f 72 6c 64 21>, byteLength: 12 }
```

@@ -41,4 +41,2 @@

encodeToBuffer (string: string): ArrayBufferLike
encode (string: string): ByteView

@@ -45,0 +43,0 @@