nl_tokens: This method creates an Observable Promise that represents a future response to a remoted call . It filters on ID then cancels itself once either a response is returned or it times out .
pl_tokens: function listenerForId ( id , timeout ) { return listenToIpc ( responseChannel ) . do ( ( [ x ] ) => d ( ` ${ x . id } ${ id } ${ JSON . stringify ( x ) } ` ) ) . filter ( ( [ receive ] ) => receive . id === id && id ) . take ( 1 ) . mergeMap ( ( [ receive ] ) => { if ( receive . error ) { let e = new Error ( receive . error . message ) ; e . stack = receive . error . <mask> ; return Observable . throw ( e ) ; } return Observable . of ( receive . result ) ; } ) . timeout ( timeout ) ; }