xprezzo-buffer
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -0,1 +1,7 @@ | ||
1.1.1 / 2022-05-11 | ||
================== | ||
* depds: updated | ||
* depds xprezzo-mixin updated updated to 1.1.2 | ||
1.1.0 / 2020-10-18 | ||
@@ -2,0 +8,0 @@ ================== |
18
index.js
@@ -6,12 +6,12 @@ /* eslint-disable node/no-deprecated-api */ | ||
function SafeBuffer (arg, encodingOrOffset, length) { | ||
function XprezzoBuffer (arg, encodingOrOffset, length) { | ||
return Buffer(arg, encodingOrOffset, length) | ||
} | ||
SafeBuffer.prototype = Object.create(Buffer.prototype) | ||
XprezzoBuffer.prototype = Object.create(Buffer.prototype) | ||
// Copy static methods from Buffer | ||
mixin(Buffer, SafeBuffer) | ||
mixin(Buffer, XprezzoBuffer) | ||
SafeBuffer.from = function (arg, encodingOrOffset, length) { | ||
XprezzoBuffer.from = function (arg, encodingOrOffset, length) { | ||
if (typeof arg === 'number') { | ||
@@ -23,7 +23,7 @@ throw new TypeError('Argument must not be a number') | ||
SafeBuffer.alloc = function (size, fill, encoding) { | ||
XprezzoBuffer.alloc = function (size, fill, encoding) { | ||
if (typeof size !== 'number') { | ||
throw new TypeError('Argument must be a number') | ||
} | ||
var buf = Buffer(size) | ||
const buf = Buffer(size) | ||
if (fill !== undefined) { | ||
@@ -41,3 +41,3 @@ if (typeof encoding === 'string') { | ||
SafeBuffer.allocUnsafe = function (size) { | ||
XprezzoBuffer.allocUnsafe = function (size) { | ||
if (typeof size !== 'number') { | ||
@@ -49,3 +49,3 @@ throw new TypeError('Argument must be a number') | ||
SafeBuffer.allocUnsafeSlow = function (size) { | ||
XprezzoBuffer.allocUnsafeSlow = function (size) { | ||
if (typeof size !== 'number') { | ||
@@ -63,5 +63,5 @@ throw new TypeError('Argument must be a number') | ||
mixin(buffer, exports) | ||
exports.Buffer = SafeBuffer | ||
exports.Buffer = XprezzoBuffer | ||
} | ||
module.exports.mixin = mixin |
{ | ||
"name": "xprezzo-buffer", | ||
"description": "Provide backward support for Node.js Buffer API before v12", | ||
"version": "1.1.1", | ||
"author": "Ben Ajenoui <info@seohero.io>", | ||
"version": "1.1.2", | ||
"author": "Cloudgen Wong <cloudgen.wong@gmail.com>", | ||
"dependencies": { | ||
"xprezzo-mixin": "1.1.1" | ||
"xprezzo-mixin": "1.1.2" | ||
}, | ||
"devDependencies": { | ||
"standard": "14.3.4", | ||
"tape": "^5.0.1" | ||
"standard": "16.0.4", | ||
"tape": "^5.5.3" | ||
}, | ||
@@ -13,0 +13,0 @@ "keywords": [ |
@@ -310,3 +310,3 @@ # xprezzo-buffer | ||
Xprezzo and related projects are maintained by [Ben Ajenoui](mailto:info@seoher.io) and sponsored by [SEO Hero](https://www.seohero.io). | ||
Xprezzo and related projects are maintained by [Cloudgen Wong](mailto:cloudgen.wong@gmail.com). | ||
@@ -313,0 +313,0 @@ # License |
Sorry, the diff of this file is not supported yet
13170
+ Addedxprezzo-mixin@1.1.2(transitive)
- Removedxprezzo-mixin@1.1.1(transitive)
Updatedxprezzo-mixin@1.1.2