You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
diff --git a/node_modules/ip/lib/ip.js b/node_modules/ip/lib/ip.js
index c1799a8..dbd83e1 100644
--- a/node_modules/ip/lib/ip.js+++ b/node_modules/ip/lib/ip.js@@ -10,7 +10,7 @@ ip.toBuffer = function(ip, buff, offset) {
var result;
if (this.isV4Format(ip)) {
- result = buff || new Buffer(offset + 4);+ result = buff || new Buffer.alloc(offset + 4);
ip.split(/\./g).map(function(byte) {
result[offset++] = parseInt(byte, 10) & 0xff;
});
@@ -45,7 +45,7 @@ ip.toBuffer = function(ip, buff, offset) {
sections.splice.apply(sections, argv);
}
- result = buff || new Buffer(offset + 16);+ result = buff || new Buffer.alloc(offset + 16);
for (i = 0; i < sections.length; i++) {
var word = parseInt(sections[i], 16);
result[offset++] = (word >> 8) & 0xff;
@@ -110,7 +110,7 @@ ip.fromPrefixLen = function(prefixlen, family) {
if (family === 'ipv6') {
len = 16;
}
- var buff = new Buffer(len);+ var buff = new Buffer.alloc(len);
for (var i = 0, n = buff.length; i < n; ++i) {
var bits = 8;
@@ -129,7 +129,7 @@ ip.mask = function(addr, mask) {
addr = ip.toBuffer(addr);
mask = ip.toBuffer(mask);
- var result = new Buffer(Math.max(addr.length, mask.length));+ var result = new Buffer.alloc(Math.max(addr.length, mask.length));
var i = 0;
// Same protocol - do bitwise and
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
[email protected]
for the project I'm working on.This got rid of the warning described here: DylanPiercey/local-devices#14
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: