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

ow

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ow - npm Package Compare versions

Comparing version 0.26.0 to 0.27.0

2

dist/index.js

@@ -38,3 +38,3 @@ "use strict";

try {
ow(value, predicate);
test_1.default(value, '', predicate);
return true;

@@ -41,0 +41,0 @@ }

@@ -6,4 +6,4 @@ "use strict";

const predicate_1 = require("./predicate");
const __1 = require("..");
const match_shape_1 = require("../utils/match-shape");
const of_type_1 = require("../utils/of-type");
class ArrayPredicate extends predicate_1.Predicate {

@@ -135,18 +135,6 @@ /**

ofType(predicate) {
let error;
// TODO [typescript@>=5] If higher-kinded types are supported natively by typescript, refactor `addValidator` to use them to avoid the usage of `any`. Otherwise, bump or remove this TODO.
return this.addValidator({
message: (_, label) => `(${label}) ${error}`,
validator: value => {
try {
for (const item of value) {
__1.default(item, predicate);
}
return true;
}
catch (error_) {
error = error_.message;
return false;
}
}
message: (_, label, error) => `(${label}) ${error}`,
validator: value => of_type_1.default(value, 'values', predicate)
});

@@ -153,0 +141,0 @@ }

{
"name": "ow",
"version": "0.26.0",
"version": "0.27.0",
"description": "Function argument validation for humans",

@@ -5,0 +5,0 @@ "license": "MIT",

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