ember-precondition

0.2.1 • Public • Published

ember-precondition Build Status

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 repository
  • npm install
  • bower install

Running

Running Tests

  • npm test (Runs ember 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/.

/ember-precondition/

    Package Sidebar

    Install

    npm i ember-precondition

    Weekly Downloads

    10

    Version

    0.2.1

    License

    none

    Unpacked Size

    7.73 kB

    Total Files

    12

    Last publish

    Collaborators

    • systembug