bare-buffer
Advanced tools
Comparing version 2.3.0 to 2.4.0
20
index.js
@@ -238,2 +238,9 @@ const constants = require('./lib/constants') | ||
writeUInt16LE (value, offset = 0) { | ||
const view = new DataView(this.buffer, this.byteOffset, this.byteLength) | ||
view.setUint16(offset, value, true) | ||
return offset + 2 | ||
} | ||
writeUInt32LE (value, offset = 0) { | ||
@@ -291,2 +298,9 @@ const view = new DataView(this.buffer, this.byteOffset, this.byteLength) | ||
writeUInt16BE (value, offset = 0) { | ||
const view = new DataView(this.buffer, this.byteOffset, this.byteLength) | ||
view.setUint16(offset, value, false) | ||
return offset + 2 | ||
} | ||
writeUInt32BE (value, offset = 0) { | ||
@@ -318,2 +332,8 @@ const view = new DataView(this.buffer, this.byteOffset, this.byteLength) | ||
readUInt16BE (offset = 0) { | ||
const view = new DataView(this.buffer, this.byteOffset, this.byteLength) | ||
return view.getUint16(offset, false) | ||
} | ||
readUInt32BE (offset = 0) { | ||
@@ -320,0 +340,0 @@ const view = new DataView(this.buffer, this.byteOffset, this.byteLength) |
{ | ||
"name": "bare-buffer", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"description": "Native buffers for JavaScript", | ||
@@ -5,0 +5,0 @@ "exports": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
350811
441