Socket
Socket
Sign inDemoInstall

@xylabs/assert

Package Overview
Dependencies
Maintainers
7
Versions
221
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xylabs/assert - npm Package Compare versions

Comparing version 2.13.30 to 2.14.0

8

dist/browser/index.d.ts

@@ -12,6 +12,8 @@ export type AssertExMessageFunc<T> = (value?: T | null) => string;

*/
declare function assertEx<T>(expr?: T | null, message?: string): T;
declare function assertEx<T>(expr?: T | null, messageFunc?: AssertExMessageFunc<T>): T;
declare function assertEx<T, R extends Error>(expr?: T | null, errorFunc?: AssertExErrorFunc<T, R>): T;
declare function assertEx<T>(expr: T | null | undefined): T;
/** deprecated - replace string with () => string */
declare function assertEx<T>(expr: T | null | undefined, message?: string): T;
declare function assertEx<T>(expr: T | null | undefined, messageFunc?: AssertExMessageFunc<T>): T;
declare function assertEx<T, R extends Error>(expr: T | null | undefined, errorFunc?: AssertExErrorFunc<T, R>): T;
export { assertEx };
//# sourceMappingURL=index.d.ts.map

@@ -12,6 +12,8 @@ export type AssertExMessageFunc<T> = (value?: T | null) => string;

*/
declare function assertEx<T>(expr?: T | null, message?: string): T;
declare function assertEx<T>(expr?: T | null, messageFunc?: AssertExMessageFunc<T>): T;
declare function assertEx<T, R extends Error>(expr?: T | null, errorFunc?: AssertExErrorFunc<T, R>): T;
declare function assertEx<T>(expr: T | null | undefined): T;
/** deprecated - replace string with () => string */
declare function assertEx<T>(expr: T | null | undefined, message?: string): T;
declare function assertEx<T>(expr: T | null | undefined, messageFunc?: AssertExMessageFunc<T>): T;
declare function assertEx<T, R extends Error>(expr: T | null | undefined, errorFunc?: AssertExErrorFunc<T, R>): T;
export { assertEx };
//# sourceMappingURL=index.d.ts.map

@@ -53,4 +53,4 @@ {

"sideEffects": false,
"version": "2.13.30",
"version": "2.14.0",
"type": "module"
}

@@ -13,6 +13,11 @@ export type AssertExMessageFunc<T> = (value?: T | null) => string

*/
function assertEx<T>(expr?: T | null, message?: string): T
function assertEx<T>(expr?: T | null, messageFunc?: AssertExMessageFunc<T>): T
function assertEx<T, R extends Error>(expr?: T | null, errorFunc?: AssertExErrorFunc<T, R>): T
function assertEx<T, R extends Error, P extends string | AssertExMessageFunc<T> | AssertExErrorFunc<T, R>>(expr?: T | null, messageOrFunc?: P): T {
function assertEx<T>(expr: T | null | undefined): T
/** deprecated - replace string with () => string */
function assertEx<T>(expr: T | null | undefined, message?: string): T
function assertEx<T>(expr: T | null | undefined, messageFunc?: AssertExMessageFunc<T>): T
function assertEx<T, R extends Error>(expr: T | null | undefined, errorFunc?: AssertExErrorFunc<T, R>): T
function assertEx<T, R extends Error, P extends string | AssertExMessageFunc<T> | AssertExErrorFunc<T, R>>(
expr: T | null | undefined,
messageOrFunc?: P,
): T {
if (expr) return expr

@@ -19,0 +24,0 @@ if (typeof messageOrFunc === 'function') {

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

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

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

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