@datagrok-libraries/utils
Advanced tools
Comparing version 4.3.11 to 4.3.12
@@ -11,3 +11,3 @@ { | ||
"fullName": "Utils", | ||
"version": "4.3.11", | ||
"version": "4.3.12", | ||
"description": "Common utilities", | ||
@@ -17,3 +17,4 @@ "dependencies": { | ||
"cash-dom": "^8.1.1", | ||
"datagrok-api": ">=1.23.0-rc.65db955990.1277e04089f4", | ||
"datagrok-api": "^1.21.1", | ||
"dayjs": "=1.11.10", | ||
"fast-sha256": "^1.3.0", | ||
@@ -20,0 +21,0 @@ "rxjs": "^6.5.5", |
@@ -1,2 +0,6 @@ | ||
export declare function serialize(obj: any, space?: number): string; | ||
export type SerializeOptions = { | ||
space?: number; | ||
useJsonDF?: boolean; | ||
}; | ||
export declare function serialize(obj: any, options?: SerializeOptions): string; | ||
export declare function deserialize(obj: string): any; | ||
@@ -3,0 +7,0 @@ export declare function applyTransformations(obj: any): any; |
import * as DG from 'datagrok-api/dg'; | ||
// Support for json serialization/deserialization of objects that | ||
// include DataFrames. Not efficient, intended for writing tests. | ||
import { fromUint8Array, toUint8Array } from 'js-base64'; | ||
const customTypeKey = '_DG_CUSTOM_SERIALIZED_TOKEN_'; | ||
export function serialize(obj, space = 2) { | ||
export function serialize(obj, options = {}) { | ||
return JSON.stringify(obj, (_key, value) => { | ||
if (value instanceof DG.DataFrame) { | ||
if (value instanceof DG.DataFrame && !options.useJsonDF) { | ||
return { | ||
[customTypeKey]: 'DataFrame', | ||
value: Array.from(value.toByteArray()) | ||
value: fromUint8Array(value.toByteArray()) | ||
}; | ||
} | ||
if (value instanceof DG.DataFrame && options.useJsonDF) { | ||
return { | ||
[customTypeKey]: 'DataFrameJSON', | ||
value: value.toJson() | ||
}; | ||
} | ||
if (value instanceof ArrayBuffer) { | ||
return { | ||
[customTypeKey]: 'ArrayBuffer', | ||
value: Array.from(new Uint8Array(value)) | ||
value: fromUint8Array(new Uint8Array(value)) | ||
}; | ||
@@ -32,3 +37,3 @@ } | ||
return value; | ||
}, space); | ||
}, options.space); | ||
} | ||
@@ -46,5 +51,7 @@ export function deserialize(obj) { | ||
case 'DataFrame': | ||
return DG.DataFrame.fromByteArray(new Uint8Array(value.value)); | ||
return DG.DataFrame.fromByteArray(toUint8Array(value.value)); | ||
case 'DataFrameJSON': | ||
return DG.DataFrame.fromJson(JSON.stringify(value.value)); | ||
case 'ArrayBuffer': | ||
return new Uint8Array(value.value).buffer; | ||
return toUint8Array(value.value).buffer; | ||
case 'Map': | ||
@@ -58,2 +65,2 @@ return new Map(value.value); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianNvbi1zZXJpYWxpemF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsianNvbi1zZXJpYWxpemF0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFFdEMsaUVBQWlFO0FBQ2pFLGlFQUFpRTtBQUVqRSxNQUFNLGFBQWEsR0FBRyw4QkFBOEIsQ0FBQztBQUVyRCxNQUFNLFVBQVUsU0FBUyxDQUFDLEdBQVEsRUFBRSxLQUFLLEdBQUcsQ0FBQztJQUMzQyxPQUFPLElBQUksQ0FBQyxTQUFTLENBQ25CLEdBQUcsRUFDSCxDQUFDLElBQUksRUFBRSxLQUFLLEVBQUUsRUFBRTtRQUNkLElBQUksS0FBSyxZQUFZLEVBQUUsQ0FBQyxTQUFTLEVBQUU7WUFDakMsT0FBTztnQkFDTCxDQUFDLGFBQWEsQ0FBQyxFQUFFLFdBQVc7Z0JBQzVCLEtBQUssRUFBRSxLQUFLLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxXQUFXLEVBQUUsQ0FBQzthQUN2QyxDQUFDO1NBQ0g7UUFDRCxJQUFJLEtBQUssWUFBWSxXQUFXLEVBQUU7WUFDaEMsT0FBTztnQkFDTCxDQUFDLGFBQWEsQ0FBQyx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GZ1bmN0aW9uIHRyYW5zZm9ybShfa2V5OiBzdHJpbmcsIHZhbHVlOiBhbnkpIHtcbiAgaWYgKHZhbHVlICYmIHZhbHVlW2N1c3RvbVR5cGVLZXldICYmIHZhbHVlLnZhbHVlKSB7XG4gICAgc3dpdGNoICh2YWx1ZVtjdXN0b21UeXBlS2V5XSkge1xuICAgIGNhc2UgJ0RhdGFGcmFtZSc6XG4gICAgICByZXR1cm4gREcuRGF0YUZyYW1lLmZyb21CeXRlQXJyYXkodG9VaW50OEFycmF5KHZhbHVlLnZhbHVlKSk7XG4gICAgY2FzZSAnRGF0YUZyYW1lSlNPTic6XG4gICAgICByZXR1cm4gREcuRGF0YUZyYW1lLmZyb21Kc29uKEpTT04uc3RyaW5naWZ5KHZhbHVlLnZhbHVlKSk7XG4gICAgY2FzZSAnQXJyYXlCdWZmZXInOlxuICAgICAgcmV0dXJuIHRvVWludDhBcnJheSh2YWx1ZS52YWx1ZSkuYnVmZmVyO1xuICAgIGNhc2UgJ01hcCc6XG4gICAgICByZXR1cm4gbmV3IE1hcCh2YWx1ZS52YWx1ZSk7XG4gICAgY2FzZSAnU2V0JzpcbiAgICAgIHJldHVybiBuZXcgU2V0KHZhbHVlLnZhbHVlKTtcbiAgICB9XG4gIH1cbiAgcmV0dXJuIHZhbHVlO1xufVxuIl19 |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
687934
4621
7
+ Addeddayjs@=1.11.10
- Removeddayjs@1.11.13(transitive)
Updateddatagrok-api@^1.21.1