script: use Buffer.isBuffer consistently
This commit is contained in:
parent
2c11316600
commit
693e39c061
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue