Gravatar for undefined
7 Likes

A ponyfill for Buffer.from, uses native implementation if available.

Use in your code Learn more
bit import bit.utils/buffer/from

A ponyfill for Buffer.from, uses native implementation if available.

Test Summary

#buffer/from() should allocate a new Buffer using an array of octetsPass
#buffer/from() should share the same allocated memory as the TypedArray with given offset and lengthPass
#buffer/from() should create a new Buffer containing the given string with utf8 encoding.Pass
#buffer/from() should copy the passed buffer data onto a new Buffer instancePass