Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hookun/bitbybit

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hookun/bitbybit - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

2

lib/toString.d.ts

@@ -1,1 +0,1 @@

export declare const toString: (buffer: ArrayBuffer, bytesPerLine?: number, delimiter?: string) => string;
export declare const toString: (buffer: ArrayBuffer, bitsPerLine?: number, delimiter?: string) => string;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toString = (buffer, bytesPerLine = 4, delimiter = ' ') => {
exports.toString = (buffer, bitsPerLine = 32, delimiter = '') => {
const lines = [];

@@ -9,6 +9,8 @@ let line = [];

for (let byteOffset = 0; byteOffset < byteLength; byteOffset++) {
const length = line.push(view.getUint8(byteOffset).toString(2).padStart(8, '0'));
if (length === bytesPerLine) {
lines.push(line.join(delimiter));
line = [];
for (const bit of view.getUint8(byteOffset).toString(2).padStart(8, '0')) {
const length = line.push(bit);
if (length === bitsPerLine) {
lines.push(line.join(delimiter));
line = [];
}
}

@@ -15,0 +17,0 @@ }

@@ -11,3 +11,3 @@ {

},
"version": "0.0.5",
"version": "0.0.6",
"license": "Apache-2.0",

@@ -36,8 +36,8 @@ "author": {

"devDependencies": {
"@typescript-eslint/eslint-plugin": "^2.30.0",
"@typescript-eslint/parser": "^2.30.0",
"@typescript-eslint/eslint-plugin": "^2.31.0",
"@typescript-eslint/parser": "^2.31.0",
"ava": "^3.8.1",
"eslint": "^6.8.0",
"npm-run-all": "^4.1.5",
"ts-node": "^8.9.1",
"ts-node": "^8.10.1",
"typedoc": "^0.17.6",

@@ -44,0 +44,0 @@ "typedoc-plugin-markdown": "^2.2.17",

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