lib/find.js
function find (by, value, strict) {
  return new Promise((resolve, reject) => {
    if (!(by in findBy)) {
      reject(new Error(`do not support find by "${by}"`))
    } else {
      findBy[by](value, strict).then(resolve, reject)
    }
  })
}
function find (by, value, strict) {
  return new Promise((resolve, reject) => {
    if (!(by in findBy)) {
      reject(new Error(`do not support find by "${by}"`))
    } else {
      findBy[by](value, strict).then(resolve, reject)
    }
  })
}
function find ( by , value , strict ) { return new Promise ( ( resolve , reject ) => { if ( ! ( by in findBy ) ) { reject ( new Error ( ` ${ by } ` ) ) } else { findBy [ by ] ( value , strict ) . then ( resolve , reject ) } } ) }
find process by condition

return Promise: [{
pid: <process id>,
ppid: <process parent id>,
uid: <user id (*nix)>,
gid: <user group id (*nix)>,
name: <command name>,
cmd: <process run args>
}, ...]

If no process found, resolve process with empty array (only reject when error occured)

@param  {String} by condition: port/pid/name ...
@param {Mixed} condition value
@return {Promise}
find process by condition