Comparing version 1.6.1 to 1.6.2
@@ -42,3 +42,3 @@ export type Dict<T = any, K extends string = string> = { | ||
function fromBase64(source: string): ArrayBufferLike; | ||
function toHex(source: Uint8Array): string; | ||
function toHex(source: ArrayBufferLike): string; | ||
function fromHex(source: string): ArrayBufferLike; | ||
@@ -45,0 +45,0 @@ } |
{ | ||
"name": "cosmokit", | ||
"description": "A collection of common utilities", | ||
"version": "1.6.1", | ||
"version": "1.6.2", | ||
"sideEffects": false, | ||
@@ -6,0 +6,0 @@ "type": "module", |
@@ -55,5 +55,5 @@ import { isNullable, mapValues } from './misc' | ||
export function toHex(source: Uint8Array) { | ||
export function toHex(source: ArrayBufferLike) { | ||
if (typeof Buffer !== 'undefined') return Buffer.from(source).toString('hex') | ||
return Array.from(source, byte => byte.toString(16).padStart(2, '0')).join('') | ||
return Array.from(new Uint8Array(source), byte => byte.toString(16).padStart(2, '0')).join('') | ||
} | ||
@@ -60,0 +60,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65372