UNPKG

@serenity-js/core

Version:

The core Serenity/JS framework, providing the Screenplay Pattern interfaces, as well as the test reporting and integration infrastructure

10 lines 379 B
import { Artifact } from '../Artifact.js'; export class JSONData extends Artifact { static fromJSON(value) { return new JSONData(Buffer.from(JSON.stringify(value, undefined, 0), 'utf8').toString('base64')); } map(fn) { return fn(JSON.parse(Buffer.from(this.base64EncodedValue, 'base64').toString('utf8'))); } } //# sourceMappingURL=JSONData.js.map