Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Properties

Properties

from?: "object" | "array"

A type of parsed structure in which the picking takes place

default

'object'

example
const tokens = intoIter(from(JSON.stringify([
{user: 'Bob', age: 21},
{user: 'Ben', age: 24},
{user: 'Rob', age: 28}
])));

const seq = sequence(
assemble(pick(tokens, '0')),

// 1 refers to `{user: ‘Rob’, age: 28}` because `{user: ‘Bob’, age: 21}` is already picked previously,
// i.e. selector tight to the previous
assemble(andPick(tokens, '1', {from: 'array'}))
);

for await (const val of seq) {
// {user: 'Bob', age: 21}
// {user: 'Rob', age: 28}
console.log(val);
}
multiple?: boolean

If true the filtration will return all matched filter results, otherwise only the first match will be returned