script: use Buffer.isBuffer consistently

This commit is contained in:
Daniel Cousens 2015-11-26 12:07:04 +11:00
parent 2c11316600
commit 693e39c061

View file

@ -16,7 +16,7 @@ var REVERSE_OPS = (function () {
var OP_INT_BASE = OPS.OP_RESERVED // OP_1 - 1 var OP_INT_BASE = OPS.OP_RESERVED // OP_1 - 1
function toASM (chunks) { function toASM (chunks) {
if (types.Buffer(chunks)) { if (Buffer.isBuffer(chunks)) {
chunks = decompile(chunks) chunks = decompile(chunks)
} }
@ -43,7 +43,7 @@ function fromASM (asm) {
function compile (chunks) { function compile (chunks) {
// TODO: remove me // TODO: remove me
if (types.Buffer(chunks)) return chunks if (Buffer.isBuffer(chunks)) return chunks
typeforce(types.Array, chunks) typeforce(types.Array, chunks)