fix(build): modernize project tooling and tighten TypeScript typings
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartbuffer',
|
||||
version: '3.0.5',
|
||||
version: '3.0.6',
|
||||
description: 'A robust TypeScript library for managing binary data by converting between Base64 strings and Uint8Array, validating buffer-like objects, and ensuring data purity.'
|
||||
}
|
||||
|
||||
+3
-3
@@ -10,13 +10,13 @@ export function base64ToUint8Array(base64: string): Uint8Array {
|
||||
return plugins.uInt8ArrayExtras.base64ToUint8Array(base64);
|
||||
}
|
||||
|
||||
export const isUint8Array = (obj: any): obj is Uint8Array => {
|
||||
export const isUint8Array = (obj: unknown): obj is Uint8Array => {
|
||||
return plugins.uInt8ArrayExtras.isUint8Array(obj);
|
||||
};
|
||||
|
||||
export function isBufferLike(obj: any): obj is ArrayBufferLike | Buffer {
|
||||
export function isBufferLike(obj: unknown): obj is ArrayBufferLike | Buffer {
|
||||
// Check for ArrayBufferLike objects in any environment
|
||||
if (obj && typeof obj.byteLength === 'number') {
|
||||
if (obj && typeof (obj as { byteLength?: unknown }).byteLength === 'number') {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,4 +2,4 @@ import * as uInt8ArrayExtras from 'uint8array-extras';
|
||||
|
||||
export {
|
||||
uInt8ArrayExtras,
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user