return true/false from EJSON.isBinary

This commit is contained in:
Andrew Wilcox
2013-05-11 15:03:45 -04:00
committed by Nick Martin
parent bd55683898
commit d53799d7a5

View File

@@ -211,8 +211,8 @@ EJSON.parse = function (item) {
};
EJSON.isBinary = function (obj) {
return (typeof Uint8Array !== 'undefined' && obj instanceof Uint8Array) ||
(obj && obj.$Uint8ArrayPolyfill);
return !!((typeof Uint8Array !== 'undefined' && obj instanceof Uint8Array) ||
(obj && obj.$Uint8ArrayPolyfill));
};
EJSON.equals = function (a, b, options) {