sg-check
Checking utilify for SUGOS
Last updated 8 months ago by realglobe .
Apache-2.0 · Repository · Bugs · Original npm · Tarball
$ cnpm install sg-check 
SYNC missed versions from official npm registry.

sg-check

Build Status npm Version JS Standard

Checking utilify for SUGOS

Installation

$ npm install sg-check --save

Usage

'use strict'

const { hasBin, hasVar } = require('sg-check')
const co = require('co')

co(function * () {
  // Check a command available
  {
    let hasWhichCommand = yield hasBin('which')
    /* ... */
  }

  // Check a variable available
  {
    let hasWindow = yield hasVar('window')
    /* ... */
  }
}).catch((err) => console.error(err))

Functions

Available functions

Signature Description
.hasBin(binName) -> Promise.<boolean> Check if a bin available
.hasVar(varName) -> Promise.<boolean> Check if a variable available

License

This software is released under the Apache-2.0 License.

Links

Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (13)

Copyright 2014 - 2017 © taobao.org |