1.9.1 • Published 12 months ago
@nlighten/json-transform-core v1.9.1
@nlighten/json-transform-core
Core types and utilities for handling JSON transformers
Installation
npm install @nlighten/json-transform-core
API
{
ContextVariablesSchemas: Record<string, TypeSchema>,
getFunctionInlineSignature: (name: string, func: FunctionDescriptor, requiredOnly?: boolean) => string,
getFunctionObjectSignature: (name: string, func: FunctionDescriptor) => string,
functionsParser: {
get(name: string) => FunctionDescriptor,
getNames() => Set<string>,
resolveDocsUrl(funcName: string, functionDescriptor ? : FunctionDescriptor) => string,
matchInline(
data: any,
callback?: (
funcName: EmbeddedTransformerFunction,
func: FunctionDescriptor,
value: any,
args: Record<string, any>,
) => any): FunctionDescriptor | null,
matchObject(data: any, extractOutputTypeRecursively ? : boolean):ObjectFunctionMatchResult | undefined,
matchAllObjectFunctionsInLine(line: string) => IterableIterator,
matchAllInlineFunctionsInLine(line: string) => IterableIterator,
},
parseArgs: (func: FunctionDescriptor, args?: string) => {},
type Argument,
type ArgumentCondition,
type ConditionalSubFunction,
type FunctionDefinition,
type FunctionDescriptor,
EmbeddedTransformerFunction, // enum
EmbeddedTransformerFunctions: EmbeddedTransformerFunction[],
type JsonTransformExample,
jsonpathJoin: (...args: (string | null | undefined)[]): string,
JsonPathFunctionRegex: RegExp,
parseTransformer: (
definition: any,
targetPath: string,
previousPaths: string[],
paths: string[] = [],
typesMap? : Record<string, TypeSchema>,
additionalContext? : Record<string, TypeSchema>,
) => void,
ParseContext: {
resolve(name: string) => TypeSchema,
},
type ParseMethod,
type HandleFunctionMethod,
definitions: Record<EmbeddedTransformerFunction, FunctionDefinition>,
examples: Record<EmbeddedTransformerFunction, JsonTransformExample>,
functions: Record<EmbeddedTransformerFunction, FunctionDescriptor>,
transformUtils: { //TransformUtils
setAdditionalContext: (additionalContext: Set<string>) => void,
getAdditionalContext: () => Set<string>,
setSpecialKeys: (specialKeys: Set<string>) => void,
getSpecialKeys: () => Set<string>,
setContextVariablesSchemas: (contextVariablesSchemas: Record<string, TypeSchema>) => void,
getContextVariablesSchemas: () => Record<string, TypeSchema>,
setScopedContextVariablesSchema: (scopedContextVariablesSchema: Record<string, TypeSchema | null>) => void,
getScopedContextVariablesSchema: () => Record<string, TypeSchema | null>,
matchesAnyOfContextVariables: (variableName: string) => boolean,
matchesAnyOfAdditionalContext: (variableName: string) => boolean,
matchesAnyOfSpecialKeys: (variableName: string) => boolean,
variableDetectionRegExpFactory: (flags = "g") => RegExp,
}
}
;License
1.1.1
1 year ago
1.9.1
12 months ago
1.8.2
12 months ago
1.9.0
12 months ago
1.8.1
1 year ago
1.7.2
1 year ago
1.8.0
1 year ago
1.7.1
1 year ago
1.7.0
1 year ago
1.5.2
1 year ago
1.3.4
1 year ago
1.6.0
1 year ago
1.5.1
1 year ago
1.3.3
1 year ago
1.5.0
1 year ago
1.3.2
1 year ago
1.4.0
1 year ago
1.3.1
1 year ago
1.3.0
1 year ago
1.8.5
12 months ago
1.8.4
12 months ago
1.8.3
12 months ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago