(algorithm: DigestAlgorithm)
| 326 | export type DigestAlgorithm = DigestAlgorithmName | DigestAlgorithmObject; |
| 327 | |
| 328 | function normalizeAlgorithm(algorithm: DigestAlgorithm) { |
| 329 | return ((typeof algorithm === "string") |
| 330 | ? { name: algorithm.toUpperCase() } |
| 331 | : { |
| 332 | ...algorithm, |
| 333 | name: algorithm.name.toUpperCase(), |
| 334 | }) as DigestAlgorithmObject; |
| 335 | } |
| 336 | |
| 337 | function isBufferSource(obj: unknown): obj is BufferSource { |
| 338 | return obj instanceof ArrayBuffer || ArrayBuffer.isView(obj); |
no outgoing calls
no test coverage detected