UNPKG

@thisisagile/easy

Version:

Straightforward library for building domain-driven microservice architectures

8 lines (6 loc) 304 B
import type { Json } from '../types/Json'; export const base64 = { decode: (data: string): string => Buffer.from(data, 'base64').toString('utf-8'), encode: (data: string): string => Buffer.from(data, 'utf-8').toString('base64'), toJson: (data: string): Json => JSON.parse(base64.decode(data)), };