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 - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

15

lib/index.js

@@ -1,7 +0,3 @@

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
"use strict";
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
const Joi = require('@hapi/joi').defaults(schema => schema.options({

@@ -11,3 +7,3 @@ presence: 'required'

module.exports = _objectSpread(_objectSpread({
module.exports = {
test: (object, schema) => {

@@ -19,7 +15,6 @@ if (!Joi.isSchema(schema)) {

return schema.validate(object).error === undefined;
}
}, Joi), {}, {
},
...Joi,
boolean: (...args) => Joi.boolean(...args).strict(),
number: (...args) => Joi.number(...args).strict()
});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJKb2kiLCJyZXF1aXJlIiwiZGVmYXVsdHMiLCJzY2hlbWEiLCJvcHRpb25zIiwicHJlc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dBQUcsQ0FBQ29CLE1BQUosQ0FBVyxHQUFHRixJQUFkLEVBQW9CQyxNQUFwQjtBQVR2QiIsInNvdXJjZXNDb250ZW50IjpbImNvbnN0IEpvaSA9IHJlcXVpcmUoJ0BoYXBpL2pvaScpLmRlZmF1bHRzKChzY2hlbWEpID0+IHNjaGVtYS5vcHRpb25zKHtcbiAgcHJlc2VuY2U6ICdyZXF1aXJlZCdcbn0pKTtcblxubW9kdWxlLmV4cG9ydHMgPSB7XG4gIHRlc3Q6IChvYmplY3QsIHNjaGVtYSkgPT4ge1xuICAgIGlmICghSm9pLmlzU2NoZW1hKHNjaGVtYSkpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcihgTm90IGEgSm9pIHNjaGVtYTogJHt0eXBlb2Ygc2NoZW1hID09PSAnc3RyaW5nJyA/IHNjaGVtYSA6IEpTT04uc3RyaW5naWZ5KHNjaGVtYSl9YCk7XG4gICAgfVxuICAgIHJldHVybiBzY2hlbWEudmFsaWRhdGUob2JqZWN0KS5lcnJvciA9PT0gdW5kZWZpbmVkO1xuICB9LFxuICAuLi5Kb2ksXG4gIGJvb2xlYW46ICguLi5hcmdzKSA9PiBKb2kuYm9vbGVhbiguLi5hcmdzKS5zdHJpY3QoKSxcbiAgbnVtYmVyOiAoLi4uYXJncykgPT4gSm9pLm51bWJlciguLi5hcmdzKS5zdHJpY3QoKVxufTtcbiJdfQ==
};
{
"name": "joi-strict",
"version": "1.2.3",
"version": "1.2.4",
"description": "Thin wrapper around joi that defaults to stricter validation.",

@@ -20,3 +20,4 @@ "main": "lib/index.js",

"u": "yarn upgrade --latest --force",
"i": "yarn install --frozen-lockfile"
"i": "yarn install --frozen-lockfile",
"it": "yarn run i && yarn run t"
},

@@ -41,20 +42,20 @@ "repository": {

"devDependencies": {
"@babel/cli": "7.10.4",
"@babel/core": "7.10.4",
"@babel/plugin-proposal-object-rest-spread": "7.10.4",
"@babel/register": "7.10.4",
"@blackflux/eslint-plugin-rules": "1.3.30",
"@blackflux/robo-config-plugin": "3.5.0",
"@babel/cli": "7.11.6",
"@babel/core": "7.11.6",
"@babel/register": "7.11.5",
"@blackflux/eslint-plugin-rules": "1.3.33",
"@blackflux/robo-config-plugin": "3.9.9",
"babel-eslint": "10.1.0",
"chai": "4.2.0",
"coveralls": "3.1.0",
"eslint": "7.4.0",
"eslint": "7.8.1",
"eslint-config-airbnb-base": "14.2.0",
"eslint-plugin-import": "2.22.0",
"eslint-plugin-json": "2.1.1",
"eslint-plugin-json": "2.1.2",
"eslint-plugin-markdown": "1.0.2",
"eslint-plugin-mocha": "7.0.1",
"js-gardener": "2.0.164",
"eslint-plugin-mocha": "8.0.0",
"js-gardener": "2.0.167",
"nyc": "15.1.0",
"semantic-release": "17.1.1"
"semantic-release": "17.1.1",
"babel-preset-latest-node": "4.1.0"
},

@@ -61,0 +62,0 @@ "licenses": [

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