jmin
Version:
Stream-based JSON token transformer with customizable key mapping and quote-safe parsing.
22 lines • 772 B
text/typescript
//#region src/index.d.ts
interface IKey {
[key: string]: string;
}
interface IOpt {
newData: string;
token: string;
tokenFinished: boolean;
isEscaped: boolean;
isQuotes: boolean;
isReserved: boolean;
}
declare const getKeyMap: (km: IKey) => IKey;
declare const transformStream: (data: string, opt: IOpt, km?: IKey | null, vm?: IKey | null) => IOpt;
declare const transform: (data: string, km?: IKey | null, vm?: IKey | null) => string;
declare const _default: {
getKeyMap: (km: IKey) => IKey;
transformStream: (data: string, opt: IOpt, km?: IKey | null, vm?: IKey | null) => IOpt;
transform: (data: string, km?: IKey | null, vm?: IKey | null) => string;
};
//#endregion
export { IKey, IOpt, _default as default, getKeyMap, transform, transformStream };