@dream2023/data-mapping
Version:
@dream2023/data-mapping is a perfect object mapping solution。
10 lines (9 loc) • 534 B
TypeScript
export declare function compilerStr(str?: string, data?: Record<string, any> | null, delimiters?: [string, string]): any;
export declare type SchemaType = Record<string, any> | ((data: any) => any) | string | null | undefined;
export interface DataMappingOptions {
schema: SchemaType;
data?: Record<string, any> | null;
delimiters?: [string, string];
defaultValue?: 'schema' | 'data' | 'schema-data';
}
export declare function dataMapping({ schema, data, delimiters, defaultValue }: DataMappingOptions): any;