bare-buffer 2.4.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +6 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -268,6 +268,12 @@ const Buffer = module.exports = exports = class Buffer extends Uint8Array {
|
|
|
268
268
|
return view.getFloat32(offset, true)
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
+
readUInt16LE (offset = 0) {
|
|
272
|
+
const view = new DataView(this.buffer, this.byteOffset, this.byteLength)
|
|
273
|
+
|
|
274
|
+
return view.getUint16(offset, true)
|
|
275
|
+
}
|
|
276
|
+
|
|
271
277
|
readUInt32LE (offset = 0) {
|
|
272
278
|
const view = new DataView(this.buffer, this.byteOffset, this.byteLength)
|
|
273
279
|
|