UNPKG

indicative-compiler

Version:

Indicative compiler to compile parsed schema into highly optimized functions

33 lines (32 loc) 1.02 kB
/** * @module compiler/sanitizer */ import { SanitizationDataRoot } from '../Contracts'; import { SanitizationsRunner } from './SanitizationsRunner'; /** * Wraps an array of [[SanitizationsRunner]] and executes * them based upon the length of an data array at runtime. */ export declare class ArrayWrapper { private field; private index; private childSanitizations; private dotPath; /** * The pointer to read the value of the field inside the data tip */ private pointer; constructor(field: string, index: string, childSanitizations: (SanitizationsRunner | ArrayWrapper)[], dotPath: string[]); /** * Returns data copy to the passed to all the children of the array. */ private getDataCopy; /** * Executes all sanitizations for a given index value inside the array. */ private executeSanitizations; /** * Execute series of sanitizations for values inside an array */ exec(data: SanitizationDataRoot, config: unknown): void; }