the-check
Check utility for the-framework
Last updated 5 days 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.16                                ...           latest (5 days ago)

23 Versions

  • 2.0.16                                ...           5 days ago
  • 2.0.13                                ...           9 days ago
  • 2.0.12                                ...           21 days ago
  • 2.0.11                                ...           21 days ago
  • 2.0.10                                ...           a month ago
  • 2.0.8                                ...           2 months ago
  • 2.0.6                                ...           2 months ago
  • 2.0.5                                ...           2 months ago
  • 2.0.4                                ...           2 months ago
  • 2.0.3                                ...           3 months ago
  • 2.0.2                                ...           3 months ago
  • 2.0.1                                ...           3 months ago
  • 2.0.0                                ...           3 months ago
  • 1.2.7                                ...           5 months ago
  • 1.2.5                                ...           5 months ago
  • 1.2.4                                ...           5 months ago
  • 1.2.3                                ...           7 months ago
  • 1.2.2                                ...           10 months ago
  • 1.2.1                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.1.1                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.0                                ...           2 years ago

Copyright 2014 - 2016 © taobao.org |