@serenity-js/core
Version:
The core Serenity/JS framework, providing the Screenplay Pattern interfaces, as well as the test reporting and integration infrastructure
14 lines • 516 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.JSONData = void 0;
const Artifact_1 = require("../Artifact");
class JSONData extends Artifact_1.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')));
}
}
exports.JSONData = JSONData;
//# sourceMappingURL=JSONData.js.map
;