ember-precondition
v0.2.1
Published
Inpired by guava precondition.
Downloads
9
Readme
ember-precondition
A Precondition utility library, inspired by guava Precondition class.
Usage
import Precondition from "ember-precondition/utils/precondition";
Precondition.checkString(variable)
Precondition.checkArray(variable)
Precondition.checkFunction(variable)
Precondition.checkNull(variable) // undefined is treated as null, return null instead of undefined.
Precondition.checkNotNull(variable)
Precondition.checkEmpty(variable)
Precondition.checkNotEmpty(variable)
if match the condition, the variable will be returned, otherwise exception is thrown.
Installation
git clone
this repositorynpm install
bower install
Running
ember serve
- Visit your app at http://localhost:4200.
Running Tests
npm test
(Runsember try:testall
to test your addon against multiple Ember versions)ember test
ember test --server
Building
ember build
For more information on using ember-cli, visit http://ember-cli.com/.