API Reference
Namespaces
Modules
Classes
Events
Global
Externals

Namespace: Ingestor

Ingestor

Type Definitions


IngestError

Error details captured when a transform fails.

Type:
  • object
Properties:
Name Type Description
step string

Transform function name, or "anonymous".

message string

Error message thrown by the transform.

input string

Input value received by the failed transform.


IngestErrorHandler(errObj)

Error handler invoked immediately when a transform fails.

Parameters:
Name Type Description
errObj Ingestor~IngestError

Details about the transform failure.

Returns:
Type
void

IngestOnErrorRegistrar(handler)

Registers an error handler on an Ingestor~IngestPipeline for chaining.

Parameters:
Name Type Description
handler Ingestor~IngestErrorHandler

Error handler to register.

Returns:
Type
Ingestor~IngestPipeline

IngestPipeline()

Callable ingest pipeline returned by ingestor.

Properties:
Name Type Description
getErrors function

Returns a shallow copy of the errors accumulated during the most recent invocation.

onError Ingestor~IngestOnErrorRegistrar

Registers a handler that is invoked immediately when a transform fails and returns the ingest function for chaining.


IngestTransform(s)

Pure string transformation used by ingestor.

Parameters:
Name Type Description
s string

Input text.

Returns:

Transformed text.

Type
string

IngestTransformFactory( [option])

Factory that creates an Ingestor~IngestTransform from an optional configuration string.

Parameters:
Name Type Argument Description
option string <optional>

Configuration string for the factory.

Returns:
Type
Ingestor~IngestTransform

QuoteTransforms

Quoting and escaping transformations.

Type:
  • object
Properties:
Name Type Description
unquote Ingestor~IngestTransform

Remove exactly one level of matching single or double quotes.

conditionalQuote Ingestor~IngestTransform

Wrap the string in double quotes only when needed.

quoteWith Ingestor~IngestTransformFactory

Create a wrapper that quotes text with the chosen quote character.

normalizeQuotes Ingestor~IngestTransformFactory

Normalize all quoting to a given style.

removeAllQuotes Ingestor~IngestTransform

Remove all quotes from the input string.

removeUnprotectedQuotes Ingestor~IngestTransform

Remove all unprotected single and double quote characters from the input string.

unescapeBackslashes Ingestor~IngestTransform

Remove backslash escapes from escaped characters.


WhitespaceTransforms

Whitespace and line-ending transformations.

Type:
  • object
Properties:
Name Type Description
normalizeNewlines Ingestor~IngestTransform

Replace all newline variants with \n.

trimLines Ingestor~IngestTransform

Trim leading and trailing whitespace from every line.

collapseWhitespace Ingestor~IngestTransform

Collapse all whitespace, including newlines, into single spaces.

collapseSpaces Ingestor~IngestTransform

Collapse spaces and tabs while preserving newline boundaries.

unwrapLines Ingestor~IngestTransform

Merge multi-line commands by removing backslash-newline continuations.

stripZeroWidth Ingestor~IngestTransform

Remove all zero-width non-joiner characters from the input string.

zeroWidth object

Namespace for zero-width character transformations.