Socket
Socket
Sign inDemoInstall

joi

Package Overview
Dependencies
Maintainers
3
Versions
238
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

joi - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

10

lib/errors.js

@@ -20,3 +20,8 @@ // Load modules

if (message) {
var topPath = path.split('.')[0];
if (message && !this._values.some(function (error) { // Don't add an error when there is already a more specific one
return topPath === error.path.split('.')[0];
})) {
this._values.push({

@@ -79,3 +84,4 @@ message: message,

hasTemplate = true;
result[paths[i]] = '{{red}}' + result[paths[i]] + '{{/}}{{br}}' + error.message + '{{/}}';
var pathMessage = typeof result[paths[i]] === 'object' ? JSON.stringify(result[paths[i]]) : result[paths[i]];
result[paths[i]] = '{{red}}' + pathMessage + '{{/}}{{br}}' + error.message + '{{/}}';
}

@@ -82,0 +88,0 @@

0

lib/index.js

@@ -0,0 +0,0 @@ // Load modules

@@ -0,0 +0,0 @@ // Load modules

@@ -105,3 +105,3 @@ // Load modules

if (unprocessedValueType !== 'function' && unprocessedValueType !== 'undefined') {
errors.add('the key (' + unprocessedKey + ') is not allowed', unprocessedKey);
errors.add('the key (' + unprocessedKey + ') is not allowed', topKeyPath + '.' + unprocessedKey);
result = false;

@@ -108,0 +108,0 @@ }

{
"name": "joi",
"description": "Object schema validation",
"version": "0.3.3",
"version": "0.3.4",
"author": "Van Nguyen <the.gol.effect@gmail.com>",

@@ -6,0 +6,0 @@ "contributors": [

@@ -0,0 +0,0 @@ <a href="https://github.com/spumko"><img src="https://raw.github.com/spumko/spumko/master/images/from.png" align="right" /></a>

@@ -0,0 +0,0 @@ // Load modules

@@ -0,0 +0,0 @@ // Load modules

Sorry, the diff of this file is not supported yet

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