src/global-client.js
function pass(to, input) {
  var defer = cdefer()
  clientPass(defer.resolve, to, input)
  return defer.promise.catch((err) => {
    console.log(`global-client-js promise exception with input: ${input}, to: ${JSON.stringify(to)}`)
  })
}
function pass(to, input) {
  var defer = cdefer()
  clientPass(defer.resolve, to, input)
  return defer.promise.catch((err) => {
    console.log(`global-client-js promise exception with input: ${input}, to: ${JSON.stringify(to)}`)
  })
}
function pass ( to , input ) { var defer = cdefer ( ) clientPass ( defer . resolve , to , input ) return defer . promise . catch ( ( err ) => { console . log ( ` ${ input } ${ JSON . stringify ( to ) } ` ) } ) }
Pass that returns a promise for getting client replies conveniently.
Has promise timeout of 60s; is properly binded.
@param  {string|JSON} to   Name of the to script, or a JSON msg containing at least to, input
@param  {*} input    Input for the client to pass
@return {Promise}        The promise object that will be resolved when target script replies.
Pass that returns a promise for getting client replies conveniently . Has promise timeout of 60s ; is properly binded .