Socket
Socket
Sign inDemoInstall

hoek

Package Overview
Dependencies
0
Maintainers
5
Versions
116
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.2.1 to 4.3.1

LICENSE.md

6

lib/escape.js
'use strict';
// Declare internals
const internals = {};

@@ -96,3 +94,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);

@@ -113,3 +111,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 +114,0 @@ };

'use strict';
// Load modules
const Crypto = require('crypto');

@@ -11,4 +9,2 @@ const Path = require('path');

// Declare internals
const internals = {};

@@ -39,3 +35,3 @@

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

@@ -805,3 +801,3 @@ else if (obj instanceof Date) {

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, '');

@@ -825,3 +821,3 @@ };

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

@@ -828,0 +824,0 @@ };

{
"name": "hoek",
"description": "General purpose node utilities",
"version": "4.2.1",
"version": "4.3.1",
"repository": "git://github.com/hapijs/hoek",
"engines": {
"node": ">=6.0.0"
},
"main": "lib/index.js",

@@ -10,15 +13,12 @@ "keywords": [

],
"engines": {
"node": ">=4.0.0"
},
"dependencies": {},
"devDependencies": {
"code": "4.x.x",
"lab": "13.x.x"
"lab": "14.x.x"
},
"scripts": {
"test": "lab -a code -t 100 -L",
"test-cov-html": "lab -a code -t 100 -L -r html -o coverage.html"
"test": "lab -a code -t 100 -L -l",
"test-cov-html": "lab -a code -t 100 -L -r html -o coverage.html -l"
},
"license": "BSD-3-Clause"
"license": "SEE LICENSE IN LICENSE.md"
}

@@ -1,13 +0,11 @@

![hoek Logo](https://raw.github.com/hapijs/hoek/master/images/hoek.png)
# hoek
Utility methods for the hapi ecosystem. This module is not intended to solve every problem for everyone, but rather as a central place to store hapi-specific methods. If you're looking for a general purpose utility module, check out [lodash](https://github.com/lodash/lodash) or [underscore](https://github.com/jashkenas/underscore).
[![Build Status](https://secure.travis-ci.org/hapijs/hoek.svg)](http://travis-ci.org/hapijs/hoek)
[![Build Status](https://travis-ci.org/hapijs/hoek.svg?branch=v4-commercial)](https://travis-ci.org/hapijs/hoek)
<a href="https://andyet.com"><img src="https://s3.amazonaws.com/static.andyet.com/images/%26yet-logo.svg" align="right" /></a>
## License
Lead Maintainer: [Nathan LaFreniere](https://github.com/nlf)
This version of the package requires a commercial license. You may not use, copy, or distribute it without first acquiring a commercial license from Sideway Inc. Using this software without a license is a violation of US and international law. To obtain a license, please contact [sales@sideway.com](mailto:sales@sideway.com). The open source version of this package can be found [here](https://github.com/hapijs/hoek).
**hoek** is sponsored by [&yet](https://andyet.com)
## Usage

@@ -14,0 +12,0 @@

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