🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@balena/jellyfish-assert

Package Overview
Dependencies
Maintainers
3
Versions
787
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@balena/jellyfish-assert

Assert library for Jellyfish

1.11.8
latest
Source
npm
Version published
Weekly downloads
58
314.29%
Maintainers
3
Weekly downloads
 
Created
Source

Jellyfish assert

This library contains assert-related utilities for use in Jellyfish.

The Jellyfish system distinguishes between two types of errors:

  • Internal errors, which are unexpected and should be fixed as soon as possible
  • User errors, which are the responsibility of the user and are usually the result of bad user usage of the system

This module provides a handy set of functions to write concise assertions for both types of errors, and remove the amount of error handling if conditionals throughout the code

Usage

Below is an example how to use this library:

import * as assert from '@balena/jellyfish-assert';

assert.INTERNAL(context, version, errors.InvalidVersion, 'Custom error details');
assert.USER(context, input, errors.WorkerNoElement, 'Custom error details');

FAQs

Package last updated on 27 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts