In the example below I'm taking a user and creating a directory for that user. I want to simply log that the user as been created. What's the best way to get access to the user
variable later in the chain?
let ensureUser$ = ghUser$
.map(u => Rx.Observable.fromPromise(createDir(u)))
.flatMapLatest(x => x)
.do(() => debug('created user dir'))
I want to do something like:
let ensureUser$ = ghUser$
.map(u => Rx.Observable.fromPromise(createDir(u)))
.flatMapLatest(x => x)
.do(() => debug(`created user dir ${u}`))