Launch Week Day 5: Introducing Reachability for PHP.Learn More
Socket
Book a DemoSign in
Socket

hoek

Package Overview
Dependencies
Maintainers
5
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hoek - npm Package Compare versions

Comparing version
4.2.1
to
4.3.1
+7
LICENSE.md
COMMERCIAL LICENSE
Copyright (c) 2019-2020 Sideway Inc.
This 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).
This package contains code previously published under an open source license. You can find the previous materials and the terms under which they were originally published at: [https://github.com/hapijs/hoek/blob/master/LICENSE](https://github.com/hapijs/hoek/blob/master/LICENSE).
+2
-4
'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 @@

Copyright (c) 2011-2016, Project contributors
Copyright (c) 2011-2014, Walmart
Copyright (c) 2011, Yahoo Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* The names of any contributors may not be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* * *
The complete list of contributors can be found at: https://github.com/hapijs/hapi/graphs/contributors
Portions of this project were initially based on the Yahoo! Inc. Postmile project,
published at https://github.com/yahoo/postmile.