1.0.4 • Published 4 years ago

@contasystemer/angularjs-assert v1.0.4

Weekly downloads
2
License
BSD-3-Clause
Repository
github
Last release
4 years ago

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');
}