UNPKG

@serenity-js/core

Version:

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

23 lines 551 B
import { Artifact } from '../Artifact.js'; /** * @public * @extends {Artifact} */ export class Photo extends Artifact { static fromBase64(value) { return new Photo(value); } static fromBuffer(value) { const buffer = value instanceof ArrayBuffer ? Buffer.from(value) : value; return Photo.fromBase64(buffer.toString('base64')); } /** * @param fn */ map(fn) { return fn(Buffer.from(this.base64EncodedValue, 'base64')); } } //# sourceMappingURL=Photo.js.map