Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 1.0.3 to 1.0.4

6

index.js

@@ -158,3 +158,7 @@

constructor () {
static encode (string = '') {
return new ByteView(new ByteEncoderIterator(string))
}
constructor (string) {
this.#encoding = 'utf-8'

@@ -161,0 +165,0 @@ }

2

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

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

@@ -47,2 +47,14 @@

### static (method) `ByteEncoder.encode`:
Args [`string: string`]
```js
import ByteEncoder from 'byte-encoder'
console.log(ByteEncoder.encode('Hello World!'))
// prints: ByteView(12) [72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]
```
### (method) `ByteEncoder.encode`:

@@ -49,0 +61,0 @@

@@ -6,3 +6,3 @@

export class ByteEncoderIterator {
declare class ByteEncoderIterator {
#string: string

@@ -9,0 +9,0 @@ #units: number

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc