## features
-- Manipulate binary data like a boss, in all browsers -- even IE6!
+- Manipulate binary data like a boss, in all browsers!
- Super fast. Backed by Typed Arrays (`Uint8Array`/`ArrayBuffer`, not `Object`)
- Extremely small bundle size (**5.04KB minified + gzipped**, 35.5KB with comments)
-- Excellent browser support (IE 6+, Chrome 4+, Firefox 3+, Safari 5.1+, Opera 11+, iOS, etc.)
+- Excellent browser support (IE 11, Edge, Chrome, Firefox, Safari 5.1+, Opera, iOS, etc.)
- Preserves Node API exactly, with one minor difference (see below)
-- Square-bracket `buf[4]` notation works, even in old browsers like IE6!
+- Square-bracket `buf[4]` notation works!
- Does not modify any browser prototypes or put anything on `window`
- Comprehensive test suite (including all buffer tests from node.js core)
var base64 = require('base64-js')
var ieee754 = require('ieee754')
-var isArray = require('isarray')
exports.Buffer = Buffer
exports.SlowBuffer = SlowBuffer
return fromArrayLike(that, obj)
}
- if (obj.type === 'Buffer' && isArray(obj.data)) {
+ if (obj.type === 'Buffer' && Array.isArray(obj.data)) {
return fromArrayLike(that, obj.data)
}
}
}
Buffer.concat = function concat (list, length) {
- if (!isArray(list)) {
+ if (!Array.isArray(list)) {
throw new TypeError('"list" argument must be an Array of Buffers')
}