Notably Polite Mariner

    @fvilers/assert
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.0 • Public • Published

    @fvilers/assert

    A TypeScript type guard to asserts that the given value is not undefined nor null

    Installation

    npm install @fvilers/assert
    

    or

    yarn add @fvilers/assert
    

    Usage

    import assert from "@fvilers/assert";
    
    const foo = null;
    
    assert(foo);

    Will throw an error

    Uncaught Error: `value` is null
    

    Install

    npm i @fvilers/assert

    DownloadsWeekly Downloads

    2

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    7.8 kB

    Total Files

    11

    Last publish

    Collaborators

    • fvilers