sg-check

1.1.5 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i sg-check

Weekly Downloads

0

Version

1.1.5

License

Apache-2.0

Last publish

Collaborators

  • realglobe