You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@hapipal/toys

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hapipal/toys - npm Package Compare versions

Comparing version

to
3.1.0

13

lib/index.js

@@ -450,2 +450,15 @@ 'use strict';

exports.patchJoiSchema = (schema) => {
const keys = Object.keys(schema.describe().keys || {});
// Make all keys optional, do not enforce defaults
if (keys.length) {
schema = schema.fork(keys, (s) => s.optional());
}
return schema.prefs({ noDefaults: true });
};
// Looks like a realm

@@ -452,0 +465,0 @@ internals.isRealm = (obj) => obj && obj.hasOwnProperty('pluginOptions') && obj.hasOwnProperty('modifiers');

5

package.json
{
"name": "@hapipal/toys",
"version": "3.0.0",
"version": "3.1.0",
"description": "The hapi utility toy chest",

@@ -49,4 +49,5 @@ "main": "lib/index.js",

"@hapi/lab": "24.x.x",
"coveralls": "3.x.x"
"coveralls": "3.x.x",
"joi": "17.x.x"
}
}

7

README.md

@@ -9,6 +9,11 @@ # toys

## Installation
```sh
npm install @hapipal/toys
```
## Usage
> See also the [API Reference](API.md)
>
> For support below node v12 or hapi v19 see toys v2.
> Toys is intended for use with hapi v19+ and nodejs v12+ (_see v2 for lower support_).

@@ -15,0 +20,0 @@ Toys is a collection of utilities made to reduce common boilerplate in **hapi v19+** projects, aid usage of events and streams in `async` functions (e.g. handlers and server methods), and provide versions of widely-used utilities from [Hoek](https://github.com/hapijs/hoek) optimized to perform well in hot code paths such as route handlers.