/
githubmirror
/
deno
Обзор
Документация
Войти
/
githubmirror
/
deno
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
ext/node/polyfills/internal/crypto/_keys.ts
28 строк
613 B
em
refactor(ext/node): use primordials across the node:* polyfill layer (#34721)
03 июн 2026, 17:24
Не верифицирован
03 июн 2026, 17:24
9935b92
Код
Авторство
О чём код?
// Copyright 2018-2026 the Deno authors. MIT license. // This file is here because to break a circular dependency between streams and // crypto. (function () { const { core, primordials } = __bootstrap; const { Symbol } = primordials; const { kKeyObject } = core.loadExtScript( "ext:deno_node/internal/crypto/constants.ts", ); const kKeyType = Symbol("kKeyType"); function isKeyObject(obj) { return ( obj != null && obj[kKeyType] !== undefined ); } function isCryptoKey(obj) { return ( obj != null && obj[kKeyObject] !== undefined ); } return { kKeyType, isKeyObject, isCryptoKey }; })();