MCPcopy
hub / github.com/socketio/socket.io / path

Method path

packages/socket.io/lib/index.ts:415–427  ·  view source on GitHub ↗
(v?: string)

Source from the content-addressed store, hash-verified

413 public path(): string;
414 public path(v?: string): this | string;
415 public path(v?: string): this | string {
416 if (!arguments.length) return this._path;
417
418 this._path = v!.replace(/\/$/, "");
419
420 const escapedPath = this._path.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
421 this.clientPathRegex = new RegExp(
422 "^" +
423 escapedPath +
424 "/socket\\.io(\\.msgpack|\\.esm)?(\\.min)?\\.js(\\.map)?(?:\\?|$)",
425 );
426 return this;
427 }
428
429 /**
430 * 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