Socket
Socket
Sign inDemoInstall

@appliedblockchain/assert-combinators

Package Overview
Dependencies
Maintainers
43
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.0.0 to 5.1.0

cjs/eventually.d.ts

6

Changelog.md
# Changelog
## [v5.1.0](../../compare/v5.0.0...v5.1.0) (2022-03-28)
* Adding eventually.
* Adding non-nullish.
* Updating changelog.
## [v5.0.0](../../compare/v4.5.0...v5.0.0) (2022-02-25)

@@ -4,0 +10,0 @@

1

cjs/defined.d.ts

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

import type { Defined } from './prelude.js';
declare const defined: <T>(value: T) => Exclude<T, undefined>;
export default defined;

4

cjs/index.d.ts

@@ -8,2 +8,3 @@ import and from './and.js';

import errorOf from './error-of.js';
import eventually from './eventually.js';
import exact from './exact.js';

@@ -25,2 +26,3 @@ import finite from './finite.js';

import nonBlankString from './non-blank-string.js';
import nonNullish from './non-nullish.js';
import null_ from './null.js';

@@ -49,2 +51,2 @@ import nullOr from './null-or.js';

export * from './prelude.js';
export { and, array, boolean, dateString, defined, eq, errorOf, exact, finite, gt, gte, if_ as if, ignore, implies, in_ as in, instance, keyed, lt, lte, never_ as never, nil, nilOr, nonBlankString, null_ as null, nullOr, number, object, ok, oneOf, or, partial, positive, predicate, record, regexp, rethrow, safeInteger, sequence, strftime, string, tuple, undefined_ as undefined, undefinedOr, unique, unknown };
export { and, array, boolean, dateString, defined, eq, errorOf, eventually, exact, finite, gt, gte, if_ as if, ignore, implies, in_ as in, instance, keyed, lt, lte, never_ as never, nil, nilOr, nonBlankString, nonNullish, null_ as null, nullOr, number, object, ok, oneOf, or, partial, positive, predicate, record, regexp, rethrow, safeInteger, sequence, strftime, string, tuple, undefined_ as undefined, undefinedOr, unique, unknown };

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.unknown = exports.unique = exports.undefinedOr = exports.undefined = exports.tuple = exports.string = exports.strftime = exports.sequence = exports.safeInteger = exports.rethrow = exports.regexp = exports.record = exports.predicate = exports.positive = exports.partial = exports.or = exports.oneOf = exports.ok = exports.object = exports.number = exports.nullOr = exports.null = exports.nonBlankString = exports.nilOr = exports.nil = exports.never = exports.lte = exports.lt = exports.keyed = exports.instance = exports.in = exports.implies = exports.ignore = exports.if = exports.gte = exports.gt = exports.finite = exports.exact = exports.errorOf = exports.eq = exports.defined = exports.dateString = exports.boolean = exports.array = exports.and = void 0;
exports.unknown = exports.unique = exports.undefinedOr = exports.undefined = exports.tuple = exports.string = exports.strftime = exports.sequence = exports.safeInteger = exports.rethrow = exports.regexp = exports.record = exports.predicate = exports.positive = exports.partial = exports.or = exports.oneOf = exports.ok = exports.object = exports.number = exports.nullOr = exports.null = exports.nonNullish = exports.nonBlankString = exports.nilOr = exports.nil = exports.never = exports.lte = exports.lt = exports.keyed = exports.instance = exports.in = exports.implies = exports.ignore = exports.if = exports.gte = exports.gt = exports.finite = exports.exact = exports.eventually = exports.errorOf = exports.eq = exports.defined = exports.dateString = exports.boolean = exports.array = exports.and = void 0;
const and_js_1 = __importDefault(require("./and.js"));

@@ -32,2 +32,4 @@ exports.and = and_js_1.default;

exports.errorOf = error_of_js_1.default;
const eventually_js_1 = __importDefault(require("./eventually.js"));
exports.eventually = eventually_js_1.default;
const exact_js_1 = __importDefault(require("./exact.js"));

@@ -65,2 +67,4 @@ exports.exact = exact_js_1.default;

exports.nonBlankString = non_blank_string_js_1.default;
const non_nullish_js_1 = __importDefault(require("./non-nullish.js"));
exports.nonNullish = non_nullish_js_1.default;
const null_js_1 = __importDefault(require("./null.js"));

@@ -67,0 +71,0 @@ exports.null = null_js_1.default;

@@ -12,3 +12,5 @@ /** Helper no-op, parametric type to expand intellisense for alias types. */

export declare type NullOr<T> = null | T;
export declare type Defined<T> = Exclude<T, undefined>;
export declare type NonNullish<T> = Exclude<T, undefined | null>;
export declare type Predicate<T = unknown> = (value: T) => boolean;
export declare type Primitive = undefined | null | boolean | number | string | symbol;

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

import type { Defined } from './prelude.js';
declare const defined: <T>(value: T) => Exclude<T, undefined>;
export default defined;

@@ -8,2 +8,3 @@ import and from './and.js';

import errorOf from './error-of.js';
import eventually from './eventually.js';
import exact from './exact.js';

@@ -25,2 +26,3 @@ import finite from './finite.js';

import nonBlankString from './non-blank-string.js';
import nonNullish from './non-nullish.js';
import null_ from './null.js';

@@ -49,2 +51,2 @@ import nullOr from './null-or.js';

export * from './prelude.js';
export { and, array, boolean, dateString, defined, eq, errorOf, exact, finite, gt, gte, if_ as if, ignore, implies, in_ as in, instance, keyed, lt, lte, never_ as never, nil, nilOr, nonBlankString, null_ as null, nullOr, number, object, ok, oneOf, or, partial, positive, predicate, record, regexp, rethrow, safeInteger, sequence, strftime, string, tuple, undefined_ as undefined, undefinedOr, unique, unknown };
export { and, array, boolean, dateString, defined, eq, errorOf, eventually, exact, finite, gt, gte, if_ as if, ignore, implies, in_ as in, instance, keyed, lt, lte, never_ as never, nil, nilOr, nonBlankString, nonNullish, null_ as null, nullOr, number, object, ok, oneOf, or, partial, positive, predicate, record, regexp, rethrow, safeInteger, sequence, strftime, string, tuple, undefined_ as undefined, undefinedOr, unique, unknown };

@@ -8,2 +8,3 @@ import and from './and.js';

import errorOf from './error-of.js';
import eventually from './eventually.js';
import exact from './exact.js';

@@ -25,2 +26,3 @@ import finite from './finite.js';

import nonBlankString from './non-blank-string.js';
import nonNullish from './non-nullish.js';
import null_ from './null.js';

@@ -49,3 +51,3 @@ import nullOr from './null-or.js';

export * from './prelude.js';
export { and, array, boolean, dateString, defined, eq, errorOf, exact, finite, gt, gte, if_ as if, ignore, implies, in_ as in, instance, keyed, lt, lte, never_ as never, nil, nilOr, nonBlankString, null_ as null, nullOr, number, object, ok, oneOf, or, partial, positive, predicate, record, regexp, rethrow, safeInteger, sequence, strftime, string, tuple, undefined_ as undefined, undefinedOr, unique, unknown };
export { and, array, boolean, dateString, defined, eq, errorOf, eventually, exact, finite, gt, gte, if_ as if, ignore, implies, in_ as in, instance, keyed, lt, lte, never_ as never, nil, nilOr, nonBlankString, nonNullish, null_ as null, nullOr, number, object, ok, oneOf, or, partial, positive, predicate, record, regexp, rethrow, safeInteger, sequence, strftime, string, tuple, undefined_ as undefined, undefinedOr, unique, unknown };
//# sourceMappingURL=index.js.map

@@ -12,3 +12,5 @@ /** Helper no-op, parametric type to expand intellisense for alias types. */

export declare type NullOr<T> = null | T;
export declare type Defined<T> = Exclude<T, undefined>;
export declare type NonNullish<T> = Exclude<T, undefined | null>;
export declare type Predicate<T = unknown> = (value: T) => boolean;
export declare type Primitive = undefined | null | boolean | number | string | symbol;
{
"name": "@appliedblockchain/assert-combinators",
"version": "5.0.0",
"version": "5.1.0",
"description": "Assertion combinators.",

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

@@ -0,9 +1,11 @@

import type { Defined } from './prelude.js'
const defined =
<T>(value: T): Exclude<T, undefined> => {
<T>(value: T): Defined<T> => {
if (typeof value === 'undefined') {
throw new TypeError('Expected defined.')
}
return value as Exclude<T, undefined>
return value as Defined<T>
}
export default defined

@@ -8,2 +8,3 @@ import and from './and.js'

import errorOf from './error-of.js'
import eventually from './eventually.js'
import exact from './exact.js'

@@ -25,2 +26,3 @@ import finite from './finite.js'

import nonBlankString from './non-blank-string.js'
import nonNullish from './non-nullish.js'
import null_ from './null.js'

@@ -59,2 +61,3 @@ import nullOr from './null-or.js'

errorOf,
eventually,
exact,

@@ -76,2 +79,3 @@ finite,

nonBlankString,
nonNullish,
null_ as null,

@@ -78,0 +82,0 @@ nullOr,

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

export type Defined<T> =
Exclude<T, undefined>
export type NonNullish<T> =
Exclude<T, undefined | null>
export type Predicate<T = unknown> =

@@ -38,0 +44,0 @@ (value: T) => boolean

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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