Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.chain(() => Future.encaseP2(emitForAll, 'prerun', this.options.args))
// Execute the command
.chain(() => Future.encaseP2(emitForAll, `pre${commandName}`, this.options.args))
// Trigger generic pre-event
.chain(value => Future
.encaseP2(emitForAll, commandName, this.options.args)
.chain(() => Future.of(value)))
// Trigger generic post-event, resolving with the value of the command execution
const futureRequest = (thread, maxWait) => encaseP2(
longPollRequest, thread, maxWait
)
(bytes, pair) => encaseP2(encryptAES, bytes, pair)
.chain(value => Future
.encaseP2(emitForAll, 'run', this.options.args)
.chain(() => Future.of(value)))
.mapRej(toArray);
(authKey, msgKey) =>
encaseP2(aesFromSha1, authKey, msgKey)