apns2
Version:
Node client for connecting to Apple's Push Notification Service using the new HTTP/2 protocol with JSON web tokens.
23 lines (22 loc) • 946 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.undici_getPoolClients = undici_getPoolClients;
exports.undici_getClientHttp2Session = undici_getClientHttp2Session;
function undici_getPoolClients(pool) {
const symbols = Object.getOwnPropertySymbols(pool);
const clientsSymbol = symbols.find((sym) => sym.description === "clients");
if (!clientsSymbol) {
return [];
}
// biome-ignore lint/suspicious/noExplicitAny: necessary to access private property
return pool[clientsSymbol] ?? [];
}
function undici_getClientHttp2Session(client) {
const symbols = Object.getOwnPropertySymbols(client);
const http2SessionSymbol = symbols.find((sym) => sym.description === "http2Session");
if (!http2SessionSymbol) {
return null;
}
// biome-ignore lint/suspicious/noExplicitAny: necessary to access private property
return client[http2SessionSymbol] ?? null;
}