gpml2pvjson
Version:
convert GPML (XML) to pvjson (json)
25 lines (24 loc) • 1.32 kB
TypeScript
export declare type JsonldNodeObject = {
[key: string]: JsonldListSetPrimitive;
};
export declare type JsonPrimitive = string | number | boolean | null | JsonldNodeObject;
export interface JsonldValueObjectWithType {
"@value": string | number | boolean | null;
"@type"?: string | null;
"@index"?: string;
"@context"?: any;
}
export interface JsonldValueObjectWithLanguage {
"@value": string | number | boolean | null;
"@language"?: string | null;
"@index"?: string;
"@context"?: any;
}
export declare type JsonldValueObject = JsonldValueObjectWithType | JsonldValueObjectWithLanguage;
export declare type JsonldListSetPrimitive = string | number | boolean | null | JsonldNodeObject | JsonldValueObject;
export declare type JsonldListSetValue = JsonldListSetPrimitive | JsonldListSetPrimitive[];
export declare function arrayify<T>(input: (T & JsonldListSetPrimitive) | (T[] & JsonldListSetPrimitive[])): T[] & JsonldListSetPrimitive[];
export declare function isJsonldListSetPrimitive(x: any): boolean;
export declare function getValuesLSV(input: JsonldListSetValue): JsonldListSetPrimitive[];
export declare function intersectsLSV(x: JsonldListSetValue, y: JsonldListSetValue): boolean;
export declare function unionLSV(...inputs: JsonldListSetValue[]): JsonldListSetPrimitive[];