-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes for community tickets #233
Conversation
…uch as strings, an arrays of numbers, or a Uint8array
…osed to an object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I'm glad to more errors on invalid input!
src/logicsig.js
Outdated
assert(Array.isArray(args)) | ||
function checkType(arg) { | ||
let theType = typeof arg; | ||
return ((theType == "string") || (theType == "number") || (arg.constructor == Uint8Array) || (arg.constructor == Buffer)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: can you use Buffer.isBuffer
to check for Buffers? That will work slightly better in browsers.
Thanks! |
Closes #153, closes #220, closes #222