Socket
Socket
Sign inDemoInstall

hoek

Package Overview
Dependencies
0
Maintainers
4
Versions
116
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.0.2 to 5.0.3

4

lib/escape.js

@@ -96,3 +96,3 @@ 'use strict';

const hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex');
const hexValue = Buffer.from(String.fromCharCode(charCode), 'ascii').toString('hex');
return '\\x' + internals.padLeft(hexValue, 2);

@@ -113,3 +113,3 @@ };

const hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex');
const hexValue = Buffer.from(String.fromCharCode(charCode), 'ascii').toString('hex');
return '&#x' + internals.padLeft(hexValue, 2) + ';';

@@ -116,0 +116,0 @@ };

@@ -40,3 +40,3 @@ 'use strict';

if (Buffer.isBuffer(obj)) {
newObj = new Buffer(obj);
newObj = Buffer.from(obj);
}

@@ -119,2 +119,6 @@ else if (obj instanceof Date) {

const key = keys[i];
if (key === '__proto__') {
continue;
}
const value = source[key];

@@ -784,3 +788,3 @@ if (value &&

exports.assert(typeof value === 'string' || Buffer.isBuffer(value), 'value must be string or buffer');
const buf = (Buffer.isBuffer(value) ? value : new Buffer(value, encoding || 'binary'));
const buf = (Buffer.isBuffer(value) ? value : Buffer.from(value, encoding || 'binary'));
return buf.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, '');

@@ -804,3 +808,3 @@ };

const buf = new Buffer(value, 'base64');
const buf = Buffer.from(value, 'base64');
return (encoding === 'buffer' ? buf : buf.toString(encoding || 'binary'));

@@ -807,0 +811,0 @@ };

{
"name": "hoek",
"description": "General purpose node utilities",
"version": "5.0.2",
"version": "5.0.3",
"repository": "git://github.com/hapijs/hoek",

@@ -6,0 +6,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc