deno.land / std@0.166.0 / node / internal / crypto / _keys.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.import { kKeyObject } from "./constants.ts";
export const kKeyType = Symbol("kKeyType");
export function isKeyObject(obj: unknown): boolean { return ( obj != null && (obj as Record<symbol, unknown>)[kKeyType] !== undefined );}
export function isCryptoKey(obj: unknown): boolean { return ( obj != null && (obj as Record<symbol, unknown>)[kKeyObject] !== undefined );}
std

Version Info

Tagged at
a year ago