Skip to content
Myr

input.js

This file

Path

test/helpers/input.js

21 lines · 1.1 KiB · JavaScript

Last changed by

Add support for `buffer: false` to `execaSync()` (#953)ehmickybefore adoptiond0052ac

History of this file

Take it

Allow any type with transforms (#709)ehmickybefore adoptioned8b2ce

lines 1–4why, one step back
1import {Buffer} from 'node:buffer';
23const textEncoder = new TextEncoder();4

Fix using both `encoding: 'utf16le'` and `lines`/`verbose` options (#931)ehmickybefore adoptiona480e1d

lines 5–6why, one step back
5export const bufferToUint8Array = buffer => new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
6

Allow any type with transforms (#709)ehmickybefore adoptioned8b2ce

line 7why, one step back
7export const foobarString = 'foobar';

Allow template strings with all methods (#933)ehmickybefore adoption8074d85

line 8why, one step back
8export const foobarArray = ['foo', 'bar'];

Add support for `buffer: false` to `execaSync()` (#953)ehmickybefore adoptiond0052ac

line 9why, one step back
9export const foobarUint8Array = textEncoder.encode(foobarString);

Allow any type with transforms (#709)ehmickybefore adoptioned8b2ce

lines 10–12why, one step back
10export const foobarArrayBuffer = foobarUint8Array.buffer;
11export const foobarUint16Array = new Uint16Array(foobarArrayBuffer);12export const foobarBuffer = Buffer.from(foobarString);

Fix using both `encoding: 'utf16le'` and `lines`/`verbose` options (#931)ehmickybefore adoptiona480e1d

lines 13–14why, one step back
13const foobarUtf16Buffer = Buffer.from(foobarString, 'utf16le');
14export const foobarUtf16Uint8Array = bufferToUint8Array(foobarUtf16Buffer);

Allow any type with transforms (#709)ehmickybefore adoptioned8b2ce

line 15why, one step back
15export const foobarDataView = new DataView(foobarArrayBuffer);

Refactor tests (#934)ehmickybefore adoption52c4bde

lines 16–17why, one step back
16export const foobarHex = foobarBuffer.toString('hex');
17export const foobarUppercase = foobarString.toUpperCase();

Add support for `buffer: false` to `execaSync()` (#953)ehmickybefore adoptiond0052ac

line 18why, one step back
18export const foobarUppercaseUint8Array = textEncoder.encode(foobarUppercase);

Add support for `std*: duplex` option (#937)ehmickybefore adoption6ca44fb

line 19why, one step back
19export const foobarUppercaseHex = Buffer.from(foobarUppercase).toString('hex');

Allow any type with transforms (#709)ehmickybefore adoptioned8b2ce

lines 20–21why, one step back
20export const foobarObject = {foo: 'bar'};
21export const foobarObjectString = JSON.stringify(foobarObject);