ts-asserts
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

ts-asserts

NPM Latest Version Downloads Count Bundle Size Test Status Last Update Date Project License

Installation

$ npm install ts-asserts

Examples

import {Asserts} from 'ts-asserts';

export function todo(input: any): void {
    Asserts.Array(input);
    Asserts.BigInt(input);
    Asserts.Boolean(input);
    Asserts.Function(input);
    Asserts.Null(input);
    Asserts.NullOrUndefined(input);
    Asserts.Number(input);
    Asserts.Object(input);
    Asserts.String(input);
    Asserts.Symbol(input);
    Asserts.Undefined(input);
    // Not
    Asserts.Not.Array(input);
    Asserts.Not.BigInt(input);
    Asserts.Not.Boolean(input);
    Asserts.Not.Function(input);
    Asserts.Not.Null(input);
    Asserts.Not.NullOrUndefined(input);
    Asserts.Not.Number(input);
    Asserts.Not.Object(input);
    Asserts.Not.String(input);
    Asserts.Not.Symbol(input);
    Asserts.Not.Undefined(input);
}

My Social Network Links

Twitter Profile

LinkedIn Profile

GitHub Profile

medium.com Profile

Pateron Profile

Package Sidebar

Install

npm i ts-asserts

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

14 kB

Total Files

32

Last publish

Collaborators

  • karbash