Lines Matching refs:util
483 // lib/core/util.js
485 "lib/core/util.js"(exports2, module2) {
494 var nodeUtil = require("util");
1139 // lib/fetch/util.js
1141 "lib/fetch/util.js"(exports2, module2) {
1148 var { isUint8Array } = require("util/types");
1794 var { types } = require("util");
1798 webidl.util = {};
1838 webidl.util.Type = function(V) {
1861 webidl.util.ConvertToInt = function(V, bitLength, signedness, opts = {}) {
1889 x = webidl.util.IntegerPart(x);
1910 x = webidl.util.IntegerPart(x);
1917 webidl.util.IntegerPart = function(n) {
1926 if (webidl.util.Type(V) !== "Object") {
1929 message: `Value of type ${webidl.util.Type(V)} is not an Object.`
1952 if (webidl.util.Type(O) !== "Object") {
1955 message: `Value of type ${webidl.util.Type(O)} is not an Object.`
1993 const type = webidl.util.Type(dictionary);
2069 const x = webidl.util.ConvertToInt(V, 64, "signed");
2073 const x = webidl.util.ConvertToInt(V, 64, "unsigned");
2077 const x = webidl.util.ConvertToInt(V, 32, "unsigned");
2081 const x = webidl.util.ConvertToInt(V, 16, "unsigned", opts);
2085 if (webidl.util.Type(V) !== "Object" || !types.isAnyArrayBuffer(V)) {
2101 if (webidl.util.Type(V) !== "Object" || !types.isTypedArray(V) || V.constructor.name !== T.name) {
2117 if (webidl.util.Type(V) !== "Object" || !types.isDataView(V)) {
2513 [Symbol.for("nodejs.util.inspect.custom")]() {
2537 if (webidl.util.Type(V) === "Object") {
2562 var inherits = require("node:util").inherits;
2699 var inherits = require("node:util").inherits;
2733 var inherits = require("node:util").inherits;
2834 var inherits = require("node:util").inherits;
3806 var { inherits } = require("node:util");
4486 var { inherits } = require("node:util");
4869 var { types } = require("util");
4980 if (webidl.util.Type(V) === "Object") {
5224 var util = require_util();
5241 var { isUint8Array, isArrayBuffer } = require("util/types");
5285 } else if (util.isFormDataLike(object)) {
5343 if (util.isDisturbed(object) || object.locked) {
5350 if (typeof source === "string" || util.isBuffer(source)) {
5387 assert(!util.isDisturbed(object), "The body has already been consumed.");
5411 if (util.isDisturbed(stream)) {
5569 return body != null && (body.stream.locked || util.isDisturbed(body.stream));
5611 var util = require_util();
5612 var { kEnumerableProperty } = util;
5634 var { types } = require("util");
5761 return !!this[kState].body && util.isDisturbed(this[kState].body.stream);
5950 if (util.isFormDataLike(V)) {
6049 var util = require_util();
6067 var { kEnumerableProperty } = util;
6290 util.addAbortListener(signal, abort);
6348 if (util.isDisturbed(inputBody.stream) || inputBody.stream.locked) {
6477 return !!this[kState].body && util.isDisturbed(this[kState].body.stream);
6501 util.addAbortListener(
7228 var util = require_util();
7302 } else if (util.isStream(body)) {
7307 util.destroy(this);
7319 } else if (util.isBuffer(body)) {
7327 } else if (util.isFormDataLike(body) || util.isIterable(body) || util.isBlobLike(body)) {
7335 this.path = query ? util.buildURL(path, query) : path;
7361 if (util.isFormDataLike(this.body)) {
7362 if (util.nodeMajor < 16 || util.nodeMajor === 16 && util.nodeMinor < 8) {
7376 } else if (util.isBlobLike(body) && this.contentType == null && body.type) {
7381 util.validateHandler(handler, method, upgrade);
7382 this.servername = util.getServerName(this.host);
7608 var util = require_util();
7680 servername = servername || options.servername || util.getServerName(host) || null;
7760 util.destroy(socket, new ConnectTimeoutError());
8113 var util = require_util();
8142 util.validateHandler(handler, opts.method, opts.upgrade);
8150 if (util.isStream(this.opts.body)) {
8151 if (util.bodyLength(this.opts.body) === 0) {
8164 } else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util.isIterable(this.opts.body)) {
8179 this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers);
8186 const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)));
8232 return util.headerNameToString(header) === "host";
8234 if (removeContent && util.headerNameToString(header).startsWith("content-")) {
8238 const name = util.headerNameToString(header);
8313 var util = require_util();
8527 ...util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0,
8532 this[kUrl] = util.parseOrigin(url);
8601 } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) {
8636 util.destroy(this[kHTTP2Session], err);
8643 util.destroy(this[kSocket].on("close", callback), err);
8664 util.destroy(this, new SocketError("other side closed"));
8665 util.destroy(this[kSocket], new SocketError("other side closed"));
8874 util.destroy(socket, err);
8931 util.destroy(this.socket, new HeadersOverflowError());
8961 util.destroy(socket, err);
8977 util.destroy(socket, new SocketError("bad response", util.getSocketInfo(socket)));
8981 util.destroy(socket, new SocketError("bad upgrade", util.getSocketInfo(socket)));
9010 const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null;
9058 util.destroy(socket, new ResponseExceededMaxSizeError());
9090 util.destroy(socket, new ResponseContentLengthMismatchError());
9097 util.destroy(socket, new InformationalError("reset"));
9100 util.destroy(socket, new InformationalError("reset"));
9103 util.destroy(socket, new InformationalError("reset"));
9117 util.destroy(socket, new HeadersTimeoutError());
9121 util.destroy(socket, new BodyTimeoutError());
9125 util.destroy(socket, new InformationalError("socket idle timeout"));
9169 util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this)));
9181 const err = this[kError] || new SocketError("closed", util.getSocketInfo(this));
9244 util.destroy(socket.on("error", () => {
9415 util.destroy(socket, new InformationalError("servername changed"));
9435 if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body))) {
9460 const bodyLength = util.bodyLength(body);
9482 util.destroy(socket, new InformationalError("aborted"));
9539 } else if (util.isBuffer(body)) {
9552 } else if (util.isBlobLike(body)) {
9558 } else if (util.isStream(body)) {
9560 } else if (util.isIterable(body)) {
9621 let contentLength = util.bodyLength(body);
9676 util.destroy(stream, err);
9684 util.destroy(stream, err);
9691 } else if (util.isBuffer(body)) {
9699 } else if (util.isBlobLike(body)) {
9723 } else if (util.isStream(body)) {
9734 } else if (util.isIterable(body)) {
9764 util.destroy(body, err);
9765 util.destroy(h2stream, err);
9774 util.destroy(pipe);
9789 util.destroy(this, err);
9824 util.destroy(body, err);
9826 util.destroy(body);
9863 util.destroy(isH2 ? h2stream : socket, err);
10032 util.destroy(socket, err);
10064 var util = require_util();
10108 ...util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0,
10114 this[kUrl] = util.parseOrigin(origin);
10115 this[kOptions] = { ...util.deepClone(options), connect, allowH2 };
10144 var util = require_util();
10178 this[kOptions] = { ...util.deepClone(options), connect };
11657 // lib/websocket/util.js
11659 "lib/websocket/util.js"(exports2, module2) {
12230 var { types } = require("util");
12566 if (webidl.util.Type(V) === "Object" && Symbol.iterator in V) {
12592 if (webidl.util.Type(V) === "Object" && !(Symbol.iterator in V)) {
12598 if (webidl.util.Type(V) === "Object") {