UNPKG

@jsonjoy.com/reactive-rpc

Version:

Reactive-RPC is a library for building reactive APIs over WebSocket, HTTP, and other RPCs.

12 lines 426 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.findTokenInText = void 0; const REGEX_AUTH_TOKEN_SPECIFIER = /tkn\.([a-zA-Z0-9\-_]+)(?:[^a-zA-Z0-9\-_]|$)/; const findTokenInText = (text) => { const match = REGEX_AUTH_TOKEN_SPECIFIER.exec(text); if (!match) return ''; return match[1] || ''; }; exports.findTokenInText = findTokenInText; //# sourceMappingURL=util.js.map