15.6.3 • Published 4 years ago

@the-/check v15.6.3

Weekly downloads
1,387
License
MIT
Repository
github
Last release
4 years ago

@the-/check

npm Version

Check utility for the-framework

Installation

$ npm install @the-/check --save

Usage

'use strict'

const {
  strict: { equal, ok },
} = require('assert')
const { unlessProduction } = require('@the-/check')

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

  myFunc('hoge')
}

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

API Guide

See API Guide for more detail

License

This software is released under the MIT License.

Links

15.6.3

4 years ago

15.6.2

4 years ago

15.6.1

4 years ago

15.5.8

5 years ago

15.5.7

5 years ago

15.5.6

5 years ago

15.5.5

5 years ago

15.5.3

5 years ago

15.5.2

5 years ago

15.5.1

5 years ago

15.5.0

5 years ago

15.4.1

5 years ago

15.2.6

5 years ago

15.2.5

5 years ago

15.2.4

5 years ago

15.2.3

5 years ago

15.2.0

5 years ago

15.1.6

5 years ago

15.1.5

5 years ago

15.1.4

5 years ago

15.1.3

5 years ago

15.1.2

5 years ago

15.1.0

5 years ago

15.0.3

5 years ago

15.0.2

5 years ago