]> zoso.dev Git - buffer.git/commit
Match Node.js Buffer.from() argument handling (test-buffer-from.js)
authorFeross Aboukhadijeh <feross@feross.org>
Fri, 16 Feb 2018 08:47:03 +0000 (00:47 -0800)
committerFeross Aboukhadijeh <feross@feross.org>
Fri, 16 Feb 2018 08:47:03 +0000 (00:47 -0800)
commit91ab5a608e9609fe4c593972030fa521d2c8a603
tree8424e8233901e3f266b9b407ec3620df888b5a5b
parent0c49962fedb94ab5ad1330710239ef804547abfa
Match Node.js Buffer.from() argument handling (test-buffer-from.js)

- Handle new String() and new Boolean() using valueOf()
- Use Symbol.toPrimitive() if it exists
- Be slightly stricter with accepting .length props
- Match error messages
index.js
test/node/test-buffer-from.js [new file with mode: 0644]