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

@santi100/assertion-lib

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@santi100/assertion-lib

This is an assertion library that asserts types and conditions.

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
18
decreased by-84.21%
Maintainers
1
Weekly downloads
 
Created
Source

Santi's Assertion Library (JavaScript)

This is an assertion library that asserts types and conditions.

Usage

Importing from a JavaScript File

Via NPM

Import @santi100/assertion-lib (for ESM) or @santi100/assertion-lib/cjs (for CJS).

Via Source Control

Import ./assertion-lib/index.js (ESM) or ./assertion-lib/cjs/index.js (CJS).

Installation

Via NPM
  • Run npm install @santi100/assertion-lib, yarn add @santi100/assertion-lib, or pnpm install @santi100/assertion-lib, depending on what package manager you use in your project.
Via Source Control
  • Run git clone https://github.com/santi100a/assertion-lib.
  • Enter the directory and run npm install, yarn install, or pnpm install to install dependencies.

Exported Members

assert(condition: boolean, { expected, actual, operator }?: AssertOptionalParams): void; Asserts that condition is truthy. Throws a (custom) AssertionError otherwise.

assertType(val: unknown, expectedType: string): void; Asserts that the type of val is expectedType. Throws an AssertionError otherwise.

FAQs

Package last updated on 07 Dec 2022

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

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