createCleanChunksInputProcessor

How to get createCleanChunksInputProcessor

import createCleanChunksInputProcessor from 'fontoxml-pipelined-importer/src/createCleanChunksInputProcessor.js'

Type: Function

Create a clean-up step in the importing pipeline. This step will use the given transformation to transform a chunk. The reverseTransform is used to 'undo' the changes.

Arguments

# Name Type Description
1. labelsToClean Array<String> | Null

The labels which should be cleaned. Null signals all chunks should be transformed

2. transform Function

The function which is called for every chunk. Should edit the chunk in-place


  Arguments
# Name Type Description
1. Chunk
3. [reverseTransform] Function

The reverse of the transform. Should return the chunk to its previous state It is advised to place remarks of the metadata of the current label

Returns

Type: PipelinedImporterInputProcessor

A configured instance of a transformation step

Was this page helpful?