Skip to main content

Function: $mu()

$mu(subject, name?, options?): Mutator

Create a new named Collector and associated Mutator. $mu is a shorthand combining collect and mutate.

Note: If the name parameter is omitted a randomly generated key will be assigned to the collector.

Parameters​

ParameterTypeDescription
subjectSubjectA CSS selector, XPath selector, or Element, or SelectorFn that the Collector should manage.
name?stringThe name of the collector of future reference from mutate.
options?string | MuOptions-

Returns​

Mutator

The Mutator instance created.