Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
bb89564339 | |||
f480be9917 | |||
11bf0d9dbb |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@push.rocks/smartbuffer",
|
"name": "@push.rocks/smartbuffer",
|
||||||
"version": "3.0.3",
|
"version": "3.0.4",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "A library for managing ArrayBufferLike structures including conversion between Base64 and Uint8Array, and buffer validation.",
|
"description": "A library for managing ArrayBufferLike structures including conversion between Base64 and Uint8Array, and buffer validation.",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
@ -49,5 +49,10 @@
|
|||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"uint8array-extras": "^1.1.0"
|
"uint8array-extras": "^1.1.0"
|
||||||
|
},
|
||||||
|
"homepage": "https://code.foss.global/push.rocks/smartbuffer",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://code.foss.global/push.rocks/smartbuffer.git"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/smartbuffer',
|
name: '@push.rocks/smartbuffer',
|
||||||
version: '3.0.3',
|
version: '3.0.4',
|
||||||
description: 'A library for managing ArrayBufferLike structures including conversion between Base64 and Uint8Array, and buffer validation.'
|
description: 'A library for managing ArrayBufferLike structures including conversion between Base64 and Uint8Array, and buffer validation.'
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ export function isBufferLike(obj: any): obj is ArrayBufferLike | Buffer {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function convertBufferToPureUint8Array(bufferArg: Buffer) {
|
export function ensurePureUint8Array(bufferArg: Uint8Array | Buffer): Uint8Array {
|
||||||
// Create a new Uint8Array with the same length as the buffer
|
// Create a new Uint8Array with the same length as the buffer
|
||||||
const uint8Array: Uint8Array = new Uint8Array(bufferArg.length);
|
const uint8Array: Uint8Array = new Uint8Array(bufferArg.length);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user