From 846da393465271c02f956ae02293e5c2d2247167 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Wed, 29 Mar 2017 17:05:31 +1100 Subject: [PATCH] script: adhere to latest standard precedence rules --- package.json | 2 +- src/script.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 88fcb46..6f998e1 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "nyc": "^8.1.0", "proxyquire": "^1.4.0", "sinon": "^1.12.2", - "standard": "^8.0.0" + "standard": "^9.0.2" }, "license": "MIT" } diff --git a/src/script.js b/src/script.js index 9aa4e13..ecfb3ac 100644 --- a/src/script.js +++ b/src/script.js @@ -10,9 +10,9 @@ var OP_INT_BASE = OPS.OP_RESERVED // OP_1 - 1 function isOPInt (value) { return types.Number(value) && - (value === OPS.OP_0) || + ((value === OPS.OP_0) || (value >= OPS.OP_1 && value <= OPS.OP_16) || - (value === OPS.OP_1NEGATE) + (value === OPS.OP_1NEGATE)) } function isPushOnlyChunk (value) { @@ -33,7 +33,7 @@ function compile (chunks) { // data chunk if (Buffer.isBuffer(chunk)) { // adhere to BIP62.3, minimal push policy - if (chunk.length === 1 && (chunk[0] === 0x81 || chunk[0] >= 1 && chunk[0] <= 16)) { + if (chunk.length === 1 && (chunk[0] === 0x81 || (chunk[0] >= 1 && chunk[0] <= 16))) { return accum + 1 }