Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

joi-strict

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

joi-strict

Thin wrapper around joi that defaults to stricter validation.

  • 1.2.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
834
decreased by-33.76%
Maintainers
1
Weekly downloads
 
Created
Source

joi-strict

Build Status Test Coverage Dependabot Status Dependencies NPM Downloads Semantic-Release Gardener

Thin wrapper around joi that defaults to stricter validation.

Install

Install with npm:

$ npm install --save joi-strict

Changes from default

The following changes to the default joi behaviour were made:

  • Every entry is required unless explicitly marked as optional().
  • Unknown object keys are not allowed unless explicitly market unknown(true).
  • Additional function Joi.test(object, schema) to check if a schema matches an object
  • boolean() and number() automatically runs in strict() mode.

Usage

const Joi = require('joi-strict');

Joi.string().validate();
// => "value" is required

For more examples, please refer to the tests.

Keywords

FAQs

Package last updated on 09 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc