Botmation Documentation

Inject

Inject

A highly composable BotAction for setting the first set of injects in a new line of BotAction's while appending the higher order injects at the end.

Inject

This higher-order BotAction is useful for composing BotAction's that inject a particular set of stuff into assembled BotAction's. files()() and indexedDBStore()() are both composed with inject()().

const inject =
(...newInjects: any[]) =>
(...actions: BotAction<PipeValue|void>[]): BotAction<any> =>
async(page, ...injects) =>
await assemblyLine()(...actions)(page, ...newInjects, ...injects)

Since inject()() directly uses assemblyLine()(), it follows its aborting behavior.

Here is an usage example.

Edit this page on GitHub

On this page

Baby Bot