the-check

Check utility for the-framework

move to @the-/check ( https://github.com/the-labo/the/tree/master/packages/check#readme )
Last updated 2 months ago by okunishinishi .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install the-check 
SYNC missed versions from official npm registry.

the-check

Build Status npm Version JS Standard

Check utility for the-framework

Installation

$ npm install the-check --save

Usage

'use strict'

const { unlessProduction } = require('the-check')

async function tryExample () {

  function myFunc (someArg) {
    // Run check only if `process.env.NODE_ENV !=== 'production'`
    unlessProduction(({ ok, equal }) => {
      ok(someArg, 'someArg is required!')
      equal(typeof someArg === 'string', 'someArg must be a string!')
    })
  }

  myFunc('hoge')
}

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

API Guide

License

This software is released under the MIT License.

Links

Current Tags

  • 2.0.23                                ...           latest (2 months ago)

30 Versions

  • 2.0.23 [deprecated]           ...           2 months ago
  • 2.0.22 [deprecated]           ...           2 months ago
  • 2.0.21 [deprecated]           ...           2 months ago
  • 2.0.20 [deprecated]           ...           2 months ago
  • 2.0.19 [deprecated]           ...           2 months ago
  • 2.0.18 [deprecated]           ...           4 months ago
  • 2.0.17 [deprecated]           ...           4 months ago
  • 2.0.16 [deprecated]           ...           5 months ago
  • 2.0.13 [deprecated]           ...           5 months ago
  • 2.0.12 [deprecated]           ...           6 months ago
  • 2.0.11 [deprecated]           ...           6 months ago
  • 2.0.10 [deprecated]           ...           7 months ago
  • 2.0.8 [deprecated]           ...           7 months ago
  • 2.0.6 [deprecated]           ...           7 months ago
  • 2.0.5 [deprecated]           ...           7 months ago
  • 2.0.4 [deprecated]           ...           7 months ago
  • 2.0.3 [deprecated]           ...           8 months ago
  • 2.0.2 [deprecated]           ...           8 months ago
  • 2.0.1 [deprecated]           ...           8 months ago
  • 2.0.0 [deprecated]           ...           8 months ago
  • 1.2.7 [deprecated]           ...           10 months ago
  • 1.2.5 [deprecated]           ...           10 months ago
  • 1.2.4 [deprecated]           ...           10 months ago
  • 1.2.3 [deprecated]           ...           a year ago
  • 1.2.2 [deprecated]           ...           a year ago
  • 1.2.1 [deprecated]           ...           a year ago
  • 1.2.0 [deprecated]           ...           2 years ago
  • 1.1.1 [deprecated]           ...           2 years ago
  • 1.1.0 [deprecated]           ...           2 years ago
  • 1.0.0 [deprecated]           ...           2 years ago

Copyright 2014 - 2016 © taobao.org |