Skip to content

API Reference / @gtkx/testing / getDefaultNormalizer

Variable: getDefaultNormalizer

const getDefaultNormalizer: ({ trim, collapseWhitespace, }?) => NormalizerFn

Defined in: queries.d.ts:9

Builds the default text normalizer, which optionally trims surrounding whitespace and collapses runs of whitespace into single spaces.

Parameters

{ trim, collapseWhitespace, }?

NormalizerOptions

Returns

NormalizerFn

A function that normalizes a string for comparison against a matcher.

Released under the MPL-2.0 License.