UNPKG

@dapore/files

Version:

Optimize the retrieval of files from a file storage system like S3

6 lines (4 loc) 269 B
import { curry, __ } from '@meltwater/phi' export const changeEncoding = (val, from, to) => Buffer.from(val, from).toString(to) export const toBase64 = curry(changeEncoding)(__, 'utf-8', 'base64') export const fromBase64 = curry(changeEncoding)(__, 'base64', 'utf-8')