Lines Matching defs:const
3 const {
41 const { inspect } = require('internal/util/inspect');
42 const {
48 const {
56 const {
71 const {
81 const path = require('path');
83 const {
87 const querystring = require('querystring');
89 const { platform } = process;
90 const isWindows = platform === 'win32';
92 const bindingUrl = internalBinding('url');
94 const {
99 const FORWARD_SLASH = /\//g;
101 const context = Symbol('context');
102 const searchParams = Symbol('query');
108 const internalSearchParams = new SafeWeakMap();
117 const unsafeProtocol = new SafeSet([
122 const hostlessProtocol = new SafeSet([
127 const slashedProtocol = new SafeSet([
144 const updateActions = {
241 const method = init[SymbolIterator];
245 const childParams = init[searchParams];
263 for (const pair of init) {
281 for (const element of pair) {
295 const visited = new SafeMap();
296 const keys = ReflectOwnKeys(init);
298 const key = keys[i];
299 const desc = ReflectGetOwnPropertyDescriptor(init, key);
301 const typedKey = toUSVString(key);
302 const typedValue = toUSVString(init[key]);
306 const keyIdx = visited.get(typedKey);
331 const separator = ', ';
332 const innerOpts = { ...ctx };
336 const innerInspect = (v) => inspect(v, innerOpts);
338 const list = this[searchParams];
339 const output = [];
345 const length = ArrayPrototypeReduce(
390 const list = this[searchParams];
424 const list = this[searchParams];
442 const list = this[searchParams];
443 const values = [];
461 const list = this[searchParams];
487 const list = this[searchParams];
496 const cur = list[i];
522 const a = this[searchParams];
523 const len = a.length;
532 const curKey = a[i];
533 const curVal = a[i + 1];
548 const lBuffer = new Array(len);
549 const rBuffer = new Array(len);
552 const mid = start + step;
587 const key = list[i];
588 const value = list[i + 1];
673 const href = bindingUrl.parse(input, base);
691 const constructor = getConstructorOf(this) || URL;
692 const obj = ObjectCreate({ constructor });
715 const ctx = this[context];
718 const {
740 const alreadyInstantiatedSearchParams = internalSearchParams.get(this);
766 const href = bindingUrl.update(this[context].href, updateActions.kHref, value);
775 const ctx = this[context];
776 const protocol = StringPrototypeSlice(ctx.href, 0, ctx.protocol_end);
788 const path = this.pathname;
791 const out = new URL(path);
815 const href = bindingUrl.update(this[context].href, updateActions.kProtocol, `${value}`);
824 const ctx = this[context];
834 const href = bindingUrl.update(this[context].href, updateActions.kUsername, `${value}`);
843 const ctx = this[context];
853 const href = bindingUrl.update(this[context].href, updateActions.kPassword, `${value}`);
862 const ctx = this[context];
878 const href = bindingUrl.update(this[context].href, updateActions.kHost, `${value}`);
887 const ctx = this[context];
899 const href = bindingUrl.update(this[context].href, updateActions.kHostname, `${value}`);
917 const href = bindingUrl.update(this[context].href, updateActions.kPort, `${value}`);
926 const ctx = this[context];
939 const href = bindingUrl.update(this[context].href, updateActions.kPathname, `${value}`);
948 const ctx = this[context];
959 const href = bindingUrl.update(this[context].href, updateActions.kSearch, toUSVString(value));
970 const cachedValue = internalSearchParams.get(this);
974 const value = new URLSearchParams(this.search);
983 const ctx = this[context];
993 const href = bindingUrl.update(this[context].href, updateActions.kHash, `${value}`);
1020 const cryptoRandom = lazyCryptoRandom();
1024 const blob = lazyBlob();
1028 const id = cryptoRandom.randomUUID();
1039 const parsed = new URL(url);
1040 const split = StringPrototypeSplit(parsed.pathname, ':');
1081 const out = [];
1090 const code = StringPrototypeCharCodeAt(qs, i);
1179 const noEscape = new Int8Array([
1194 const paramHexTable = hexTable.slice();
1200 const len = array.length;
1204 const firstEncodedParam = encodeStr(array[0], noEscape, paramHexTable);
1205 const firstEncodedValue = encodeStr(array[1], noEscape, paramHexTable);
1209 const encodedParam = encodeStr(array[i], noEscape, paramHexTable);
1210 const encodedValue = encodeStr(array[i + 1], noEscape, paramHexTable);
1229 for (const key of ObjectKeys(obj)) {
1238 for (const key of ObjectGetOwnPropertySymbols(obj)) {
1251 const sizeLeft = mid - start;
1252 const sizeRight = end - mid;
1280 const iterator = ObjectCreate(URLSearchParamsIteratorPrototype);
1290 const URLSearchParamsIteratorPrototype = ObjectCreate(IteratorPrototype);
1299 const {
1304 const values = target[searchParams];
1305 const len = values.length;
1313 const name = values[index];
1314 const value = values[index + 1];
1338 const innerOpts = { ...ctx };
1342 const {
1347 const output = ArrayPrototypeReduce(
1350 const key = i % 2 === 0;
1362 const breakLn = StringPrototypeIncludes(inspect(output, innerOpts), '\n');
1363 const outputStrs = ArrayPrototypeMap(output, (p) => inspect(p, innerOpts));
1397 const { hostname, pathname, port, username, password, search } = url;
1398 const options = {
1421 const hostname = url.hostname;
1425 const third = StringPrototypeCodePointAt(pathname, n + 2) | 0x20;
1446 const letter = StringPrototypeCodePointAt(pathname, 1) | 0x20;
1447 const sep = StringPrototypeCharAt(pathname, 2);
1459 const pathname = url.pathname;
1462 const third = StringPrototypeCodePointAt(pathname, n + 2) | 0x20;
1494 const percentRegEx = /%/g;
1495 const backslashRegEx = /\\/g;
1496 const newlineRegEx = /\n/g;
1497 const carriageReturnRegEx = /\r/g;
1498 const tabRegEx = /\t/g;
1499 const questionRegex = /\?/g;
1500 const hashRegex = /#/g;
1519 const outURL = new URL('file://');
1521 const hostnameEndIndex = StringPrototypeIndexOf(filepath, '\\', 2);
1536 const hostname = StringPrototypeSlice(filepath, 2, hostnameEndIndex);
1544 const filePathLast = StringPrototypeCharCodeAt(filepath,