Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@contasystemer/angularjs-assert

contasystemer28BSD-3-Clause1.0.4

AngularJS assert module provides a set of assertion functions for verifying invariants.

Conta, AngularJS, Assert

readme

Description

AngularJS assert module provides a set of assertion functions for verifying invariants.

Install

Include the file is HMTL

<script src="/node_modules/@contasystemer/angularjs-assert/src/angularjs-assert.js"></script>

or require the file

require('@contasystemer/angularjs-assert');

Usage

csAssert.ok(angular.isObject(result), 'Result should be an object');

It's an equvivalent of:

if (angular.isObject(result) === false) {
    throw new Error('Result should be an object');
}

changelog

August 27th 2020

Released version 1.0.0.