@hookun/bitbybit
Advanced tools
Comparing version 0.0.6 to 0.0.8
@@ -1,1 +0,1 @@ | ||
export declare const toString: (buffer: ArrayBuffer, bitsPerLine?: number, delimiter?: string) => string; | ||
export declare const toString: (buffer: ArrayBuffer, bitsPerLine?: number, maxLineCount?: number, delimiter?: string) => string; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.toString = (buffer, bitsPerLine = 32, delimiter = '') => { | ||
exports.toString = (buffer, bitsPerLine = 32, maxLineCount = Infinity, delimiter = '') => { | ||
const lines = []; | ||
@@ -12,3 +12,6 @@ let line = []; | ||
if (length === bitsPerLine) { | ||
lines.push(line.join(delimiter)); | ||
const lineCount = lines.push(line.join(delimiter)); | ||
if (maxLineCount <= lineCount) { | ||
return lines.join('\n'); | ||
} | ||
line = []; | ||
@@ -15,0 +18,0 @@ } |
@@ -11,3 +11,3 @@ { | ||
}, | ||
"version": "0.0.6", | ||
"version": "0.0.8", | ||
"license": "Apache-2.0", | ||
@@ -14,0 +14,0 @@ "author": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22352
213