JSPM

is-child-process

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 454
  • Score
    100M100P100Q103585F
  • License MIT

Checks whether a value is child process result, which in case is more specific Node.js EventEmitter. Browserify-ready.

Package Exports

  • is-child-process

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (is-child-process) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

is-child-process npmjs.com The MIT License

Checks whether a value is child process result, which in case is more specific Node.js EventEmitter. Browserify-ready.

code climate standard code style travis build status coverage status dependency status

Install

npm i is-child-process --save

Usage

For more use-cases see the tests

var isChildProcess = require('is-child-process')

returns false

var fs = require('fs')
var Dush = require('dush')
var Emitter = require('events').EventEmitter

isChildProcess(fs.createReadStream('package.json')) //=> false
isChildProcess(new Emitter()) //=> false
isChildProcess(new Dush()) //=> false

returns true

var cp = require('child_process')

var spawn = cp.spawn('echo', ['hello world'])
var exec = cp.exec('echo "hello world"')

isChildProcess(spawn) //=> true
isChildProcess(exec) //=> true
  • is-emitter: Check that given value is EventEmitter, not so strict as is-node-emitter.
  • is-node-emitter: Strictly checks that given value is nodejs EventEmitter. It's easy, because his API is in frozen state.
  • is-node-stream: Strictly and correctly checks if value is a nodejs stream.
  • is-request-stream: Check that given value is request stream

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.

Charlike Make Reagent new message to charlike freenode #charlike

tunnckocore.tk keybase tunnckocore tunnckoCore npm tunnckoCore twitter tunnckoCore github