@pistonite/pure 0.23.0 → 0.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pistonite/pure",
3
- "version": "0.23.0",
3
+ "version": "0.23.1",
4
4
  "type": "module",
5
5
  "description": "Pure TypeScript libraries for my projects",
6
6
  "homepage": "https://github.com/Pistonite/pure",
@@ -26,8 +26,8 @@ export class FsFileStandaloneImplFileAPI implements FsFileStandalone {
26
26
 
27
27
  public async getBytes(): Promise<FsResult<Uint8Array>> {
28
28
  try {
29
- const data = await this.file.bytes();
30
- return { val: data };
29
+ const data = await this.file.arrayBuffer();
30
+ return { val: new Uint8Array(data) };
31
31
  } catch (e) {
32
32
  console.error(e);
33
33
  return { err: fsFail(errstr(e)) };
@@ -76,8 +76,8 @@ export class FsFileStandaloneImplHandleAPI implements FsFileStandalone {
76
76
  return file;
77
77
  }
78
78
  try {
79
- const data = await file.val.bytes();
80
- return { val: data };
79
+ const data = await file.val.arrayBuffer();
80
+ return { val: new Uint8Array(data) };
81
81
  } catch (e) {
82
82
  console.error(e);
83
83
  return { err: fsFail(errstr(e)) };