This package has been deprecated

Author message:

move to @the-/assert ( https://github.com/the-labo/the/tree/master/packages/assert#readme )

the-assert

1.0.4 • Public • Published

the-assert

Build Status npm Version JS Standard

Assert for the-framework

Installation

$ npm install the-assert --save

Usage

'use strict'

const { TheAssert } = require('the-assert')

async function tryExample () {
  const assert = new TheAssert('MyApp') //

  function sum (a, b) {
    assert(arguments.length > 0, 'must take two arguments')
    return a + b
  }

  sum() // -> new Error(`[MyApp] must take two arguments`)
}

tryExample().catch((err) => console.error(err))

API Guide

License

This software is released under the MIT License.

Links

Readme

Keywords

Package Sidebar

Install

npm i the-assert

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

41.3 kB

Total Files

33

Last publish

Collaborators

  • okunishinishi