Lines Matching defs:const

7 const common = require('../common');
9 const assert = require('assert');
10 const { customInspectSymbol: inspect } = require('internal/util');
11 const util = require('util');
13 const buf = Buffer.from([0xef, 0xbb, 0xbf, 0x74, 0x65,
22 const dec = new TextDecoder(i);
24 const res = dec.decode(buf);
29 const dec = new TextDecoder(i);
40 const dec = new TextDecoder(i, { ignoreBOM: true });
41 const res = dec.decode(buf);
46 const dec = new TextDecoder(i, { ignoreBOM: true });
70 const dec = new TextDecoder(i, { fatal: true });
81 const dec = new TextDecoder(i, { fatal: true });
97 const dec = new TextDecoder(undefined, null);
106 const dec = new TextDecoder('utf-16le');
107 const res = dec.decode(Buffer.from('test€', 'utf-16le'));
113 const dec = new TextDecoder('utf-16be');
114 const res = dec.decode(Buffer.from('test€', 'utf-16le').swap16());
120 const dec = new TextDecoder('utf-8', { ignoreBOM: true });
152 const dec = new TextDecoder('utf-8', { ignoreBOM: true });
161 const dec = new TextDecoder();
166 const inspectFn = TextDecoder.prototype[inspect];
167 const decodeFn = TextDecoder.prototype.decode;
168 const {
174 const instance = new TextDecoder();
176 const expectedError = {
188 const invalidThisArgs = [{}, [], true, 1, '', new TextEncoder()];
210 const decoder = new TextDecoder();
211 const chunk = new Uint8Array([0x66, 0x6f, 0x6f, 0xed]);
212 const str = decoder.decode(chunk);
218 const decoder = new TextDecoder('Shift_JIS');
219 const chunk = new Uint8Array([-1]);
220 const str = decoder.decode(chunk);
229 const buffer = new ArrayBuffer(1);
231 const decoder = new TextDecoder();