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.
Files changed (2) hide show
  1. package/index.js +6 -0
  2. 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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bare-buffer",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "Native buffers for JavaScript",
5
5
  "exports": {
6
6
  ".": "./index.js",