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.28.0 to 0.28.1

20

dist/index.d.ts

@@ -46,3 +46,3 @@ import { Predicate } from './predicates/predicate';

*/
isValid: <T>(value: T, predicate: BasePredicate<T>) => value is T;
isValid: <T>(value: unknown, predicate: BasePredicate<T>) => value is T;
/**

@@ -65,4 +65,20 @@ Create a reusable validator.

*/
(value: T, label?: string): void;
(value: unknown | T, label?: string): void;
}
/**
Turn a `ReusableValidator` into one with a type assertion.
@example
```
const checkUsername = ow.create(ow.string.minLength(3));
const checkUsername_: AssertingValidator<typeof checkUsername> = checkUsername;
```
@example
```
const predicate = ow.string.minLength(3);
const checkUsername: AssertingValidator<typeof predicate> = ow.create(predicate);
```
*/
export declare type AssertingValidator<T> = T extends ReusableValidator<infer R> ? (value: unknown, label?: string) => asserts value is R : T extends BasePredicate<infer R> ? (value: unknown, label?: string) => asserts value is R : never;
declare const _ow: Ow;

@@ -69,0 +85,0 @@ export default _ow;

10

package.json
{
"name": "ow",
"version": "0.28.0",
"version": "0.28.1",
"description": "Function argument validation for humans",

@@ -52,3 +52,3 @@ "license": "MIT",

"dependencies": {
"@sindresorhus/is": "^4.0.1",
"@sindresorhus/is": "^4.2.0",
"callsites": "^3.1.0",

@@ -63,3 +63,3 @@ "dot-prop": "^6.0.1",

"@types/lodash.isequal": "^4.5.5",
"@types/node": "^16.9.6",
"@types/node": "^16.10.2",
"@types/vali-date": "^1.0.0",

@@ -71,4 +71,4 @@ "ava": "^2.4.0",

"nyc": "^15.1.0",
"ts-node": "^10.0.0",
"typedoc": "^0.22.4",
"ts-node": "^10.2.1",
"typedoc": "^0.22.5",
"typescript": "^4.4.3",

@@ -75,0 +75,0 @@ "xo": "^0.38.2"

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