input.js
This file
Path
test/helpers/input.js
12 lines · 528 bytes · JavaScript
Last changed by
Allow any type with transforms (#709)ehmickybefore adoptioned8b2ce
History of this fileTake it
Allow any type with transforms (#709)ehmickybefore adoptioned8b2ce
lines 1–12why, one step back1import {Buffer} from 'node:buffer';23const textEncoder = new TextEncoder();45export const foobarString = 'foobar';6export const foobarUint8Array = textEncoder.encode('foobar');7export const foobarArrayBuffer = foobarUint8Array.buffer;8export const foobarUint16Array = new Uint16Array(foobarArrayBuffer);9export const foobarBuffer = Buffer.from(foobarString);10export const foobarDataView = new DataView(foobarArrayBuffer);11export const foobarObject = {foo: 'bar'};12export const foobarObjectString = JSON.stringify(foobarObject);