New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@jcbhmr/assert

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@jcbhmr/assert

🚫 Dead simple assertion function

unpublished
latest
npmnpm
Version
1.0.1
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

assert()

🚫 Dead simple assertion function

import assert from "@jcbhmr/assert"

assert(typeof origin === "string", `Uh oh! Not in a browser!`)

Source code

const assert = (result, message = `Assertion failed`) => {
    if (!result) {
        throw new AssertionError(string)
    }
}

FAQs

Package last updated on 01 Jul 2022

Related posts