MCPcopy Index your code
hub / github.com/socketio/socket.io / path

Method path

lib/index.ts:345–357  ·  view source on GitHub ↗
(v?: string)

Source from the content-addressed store, hash-verified

343 public path(): string;
344 public path(v?: string): this | string;
345 public path(v?: string): this | string {
346 if (!arguments.length) return this._path;
347
348 this._path = v!.replace(/\/$/, "");
349
350 const escapedPath = this._path.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
351 this.clientPathRegex = new RegExp(
352 "^" +
353 escapedPath +
354 "/socket\\.io(\\.msgpack|\\.esm)?(\\.min)?\\.js(\\.map)?(?:\\?|$)"
355 );
356 return this;
357 }
358
359 /**
360 * Set the delay after which a client without namespace is closed

Callers 1

constructorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected