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

typanion

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typanion - npm Package Compare versions

Comparing version 3.3.2 to 3.4.0

3

lib/index.d.ts

@@ -74,2 +74,5 @@ export declare type BoundCoercionFn = () => BoundCoercionFn;

}) => StrictValidator<unknown, ToOptional<{ [P_1 in keyof T]: InferType<T[P_1]>; } & DeriveIndexUnlessNull<UnknownValidator>>>;
export declare const isPartial: <T extends { [P in keyof T]: StrictValidator<any, any>; }>(props: T) => StrictValidator<unknown, ToOptional<{ [P_1 in keyof T]: InferType<T[P_1]>; } & {
[k: string]: unknown;
}>>;
export declare const isInstanceOf: <T extends new (...args: any) => InstanceType<T>>(constructor: T) => StrictValidator<unknown, InstanceType<T>>;

@@ -76,0 +79,0 @@ export declare const isOneOf: <T extends StrictValidator<any, any>>(specs: readonly T[], { exclusive, }?: {

8

lib/index.js

@@ -69,3 +69,3 @@ 'use strict';

if (value !== expected)
return pushError(state, `Expected a literal (got ${getPrintable(expected)})`);
return pushError(state, `Expected a literal (got ${getPrintable(value)})`);
return true;

@@ -318,2 +318,5 @@ },

};
const isPartial = (props) => {
return isObject(props, { extra: isDict(isUnknown()) });
};
const isInstanceOf = (constructor) => makeValidator({

@@ -534,3 +537,3 @@ test: (value, state) => {

return pushError(state, `Expected to be a valid ISO 8601 date string (got ${getPrintable(value)})`);
return false;
return true;
},

@@ -683,2 +686,3 @@ });

exports.isOptional = isOptional;
exports.isPartial = isPartial;
exports.isPositive = isPositive;

@@ -685,0 +689,0 @@ exports.isString = isString;

{
"name": "typanion",
"version": "3.3.2",
"version": "3.4.0",
"main": "lib/index",

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

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