ethereum-bloom-filters
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -28,3 +28,3 @@ "use strict"; | ||
function bytesToHex(bytes) { | ||
let hex = []; | ||
const hex = []; | ||
for (let i = 0; i < bytes.length; i++) { | ||
@@ -46,3 +46,3 @@ hex.push((bytes[i] >>> 4).toString(16)); | ||
if (typeof value === 'string') { | ||
let match = value.match(/^(0x)?[0-9a-fA-F]*$/); | ||
const match = value.match(/^(0x)?[0-9a-fA-F]*$/); | ||
if (!match) { | ||
@@ -76,2 +76,3 @@ throw new Error('invalid hexidecimal string'); | ||
if (!value || | ||
// tslint:disable-next-line: radix | ||
parseInt(String(value.length)) != value.length || | ||
@@ -83,2 +84,3 @@ typeof value === 'string') { | ||
const v = value[i]; | ||
// tslint:disable-next-line: radix | ||
if (v < 0 || v >= 256 || parseInt(String(v)) != v) { | ||
@@ -95,6 +97,6 @@ return false; | ||
function addSlice(array) { | ||
if (array.slice) { | ||
if (array.slice !== undefined) { | ||
return array; | ||
} | ||
array.slice = function () { | ||
array.slice = () => { | ||
const args = Array.prototype.slice.call(arguments); | ||
@@ -101,0 +103,0 @@ return addSlice(new Uint8Array(Array.prototype.slice.apply(array, args))); |
{ | ||
"name": "ethereum-bloom-filters", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Ability to test bloom filters for ethereum.", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"build": "tsc && build-web-scripts", | ||
"build": "tsc && npm run build-web-scripts", | ||
"watch": "tsc --watch", | ||
@@ -9,0 +9,0 @@ "test": "jest", |
@@ -0,1 +1,4 @@ | ||
[![npm version](https://badge.fury.io/js/ethereum-bloom-filters.svg)](https://badge.fury.io/js/ethereum-bloom-filters) | ||
![downloads](https://img.shields.io/npm/dw/ethereum-bloom-filters) | ||
# ethereum-bloom-filters | ||
@@ -2,0 +5,0 @@ |
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
18163
321
173