varuint-bitcoin
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -15,7 +15,7 @@ 'use strict' | ||
encode.bytes = 1 | ||
} else if (n < 0xffff) { | ||
} else if (n <= 0xffff) { | ||
buffer.writeUInt8(0xfd, offset) | ||
buffer.writeUInt16LE(n, offset + 1) | ||
encode.bytes = 3 | ||
} else if (n < 0xffffffff) { | ||
} else if (n <= 0xffffffff) { | ||
buffer.writeUInt8(0xfe, offset) | ||
@@ -60,4 +60,4 @@ buffer.writeUInt32LE(n, offset + 1) | ||
n < 0xfd ? 1 | ||
: n < 0xffff ? 3 | ||
: n < 0xffffffff ? 5 | ||
: n <= 0xffff ? 3 | ||
: n <= 0xffffffff ? 5 | ||
: 9 | ||
@@ -64,0 +64,0 @@ ) |
{ | ||
"name": "varuint-bitcoin", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "encode/decode number as bitcoin variable length integer", | ||
@@ -20,11 +20,13 @@ "homepage": "https://github.com/fanatid/varuint-bitcoin", | ||
"scripts": { | ||
"coverage": "nyc --check-coverage --branches 100 --functions 100 tape test/*.js", | ||
"lint": "standard", | ||
"test": "npm run lint && npm run unit", | ||
"unit": "tap --cov test/*.js" | ||
"unit": "tape test/*.js" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"nyc": "^6.2.1", | ||
"standard": "^6.0.7", | ||
"tap": "^5.7.0" | ||
"tape": "^4.5.1" | ||
} | ||
} |
# varuint-bitcoin | ||
[![NPM Package](https://img.shields.io/npm/v/varuint-bitcoin.svg?style=flat-square)](https://www.npmjs.org/package/varuint-bitcoin) | ||
[![Build Status](https://img.shields.io/travis/fanatid/varuint-bitcoin.svg?branch=master&style=flat-square)](https://travis-ci.org/fanatid/varuint-bitcoin) | ||
[![Build Status](https://img.shields.io/travis/bitcoinjs/varuint-bitcoin.svg?branch=master&style=flat-square)](https://travis-ci.org/bitcoinjs/varuint-bitcoin) | ||
@@ -6,0 +6,0 @@ [![abstract-encoding](https://img.shields.io/badge/abstract--encoding-compliant-brightgreen.svg?style=flat-square)](https://github.com/mafintosh/abstract-encoding) |
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
4720
3