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

@appliedblockchain/assert-combinators

Package Overview
Dependencies
Maintainers
40
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@appliedblockchain/assert-combinators - npm Package Compare versions

Comparing version 5.6.0 to 5.6.1

5

Changelog.md
# Changelog
## [v5.6.1](../../compare/v5.6.0...v5.6.1) (2023-10-05)
* Fix(or): fixing typing for `or`.
* Updating changelog.
## [v5.6.0](../../compare/v5.5.0...v5.6.0) (2022-12-14)

@@ -4,0 +9,0 @@

4

cjs/or.d.ts

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

import type { Assert } from './prelude.js';
declare const or: <T extends Assert<unknown>[]>(...as: T) => T[number];
import type { Assert, Asserted } from './prelude.js';
declare const or: <As extends Assert<unknown>[]>(...as: As) => (value: unknown) => Asserted<As[number]>;
export default or;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const util_1 = require("util");
const or = (...as) => value => {
const or = (...as) => (value) => {
for (const a of as) {

@@ -6,0 +6,0 @@ try {

@@ -23,1 +23,2 @@ /** Helper no-op, parametric type to expand intellisense for alias types. */

export type OptionalIfUndefined<T> = Omit<T, keyof OptionalIfUndefinedOnly<T>> & OptionalIfUndefinedOnly<T>;
export type IntersectionOfUnion<T> = (T extends unknown ? (_: T) => unknown : never) extends (_: infer R) => unknown ? R : never;

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

import type { Assert } from './prelude.js';
declare const or: <T extends Assert<unknown>[]>(...as: T) => T[number];
import type { Assert, Asserted } from './prelude.js';
declare const or: <As extends Assert<unknown>[]>(...as: As) => (value: unknown) => Asserted<As[number]>;
export default or;
import { inspect } from 'util';
const or = (...as) => value => {
const or = (...as) => (value) => {
for (const a of as) {

@@ -4,0 +4,0 @@ try {

@@ -23,1 +23,2 @@ /** Helper no-op, parametric type to expand intellisense for alias types. */

export type OptionalIfUndefined<T> = Omit<T, keyof OptionalIfUndefinedOnly<T>> & OptionalIfUndefinedOnly<T>;
export type IntersectionOfUnion<T> = (T extends unknown ? (_: T) => unknown : never) extends (_: infer R) => unknown ? R : never;
{
"name": "@appliedblockchain/assert-combinators",
"version": "5.6.0",
"version": "5.6.1",
"description": "Assertion combinators.",

@@ -5,0 +5,0 @@ "type": "module",

@@ -1,10 +0,10 @@

import type { Assert } from './prelude.js'
import type { Assert, Asserted } from './prelude.js'
import { inspect } from 'util'
const or: <T extends Assert<unknown>[]>(...as: T) => T[number] =
(...as) =>
value => {
const or =
<As extends Assert<unknown>[]>(...as: As) =>
(value: unknown) => {
for (const a of as) {
try {
return a(value)
return a(value) as Asserted<As[number]>
} catch (err) {

@@ -11,0 +11,0 @@ continue

@@ -74,1 +74,4 @@ /** Helper no-op, parametric type to expand intellisense for alias types. */

Omit<T, keyof OptionalIfUndefinedOnly<T>> & OptionalIfUndefinedOnly<T>
export type IntersectionOfUnion<T> =
(T extends unknown ? (_: T) => unknown : never) extends (_: infer R) => unknown ? R : never

Sorry, the diff of this file is not supported yet

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