@zenfs/core 0.0.6 → 0.0.7

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/dist/utils.d.ts CHANGED
@@ -10,16 +10,6 @@ import type { BaseBackendConstructor } from './backends/backend.js';
10
10
  * @internal
11
11
  */
12
12
  export declare function mkdirpSync(p: string, mode: number, cred: Cred, fs: FileSystem): void;
13
- /**
14
- * Copies a slice of the given buffer
15
- * @internal
16
- */
17
- export declare function copyingSlice(buff: Buffer, start?: number, end?: number): Buffer;
18
- /**
19
- * Option validator for a Buffer file system option.
20
- * @internal
21
- */
22
- export declare function bufferValidator(v: object): Promise<void>;
23
13
  /**
24
14
  * Checks that the given options object is valid for the file system options.
25
15
  * @internal
package/dist/utils.js CHANGED
@@ -20,33 +20,6 @@ export function mkdirpSync(p, mode, cred, fs) {
20
20
  fs.mkdirSync(p, mode, cred);
21
21
  }
22
22
  }
23
- /**
24
- * Copies a slice of the given buffer
25
- * @internal
26
- */
27
- export function copyingSlice(buff, start = 0, end = buff.length) {
28
- if (start < 0 || end < 0 || end > buff.length || start > end) {
29
- throw new TypeError(`Invalid slice bounds on buffer of length ${buff.length}: [${start}, ${end}]`);
30
- }
31
- if (buff.length === 0) {
32
- // Avoid s0 corner case in ArrayBuffer case.
33
- return Buffer.alloc(0);
34
- }
35
- else {
36
- return buff.subarray(start, end);
37
- }
38
- }
39
- /**
40
- * Option validator for a Buffer file system option.
41
- * @internal
42
- */
43
- export function bufferValidator(v) {
44
- return __awaiter(this, void 0, void 0, function* () {
45
- if (!Buffer.isBuffer(v)) {
46
- throw new ApiError(ErrorCode.EINVAL, 'option must be a Buffer.');
47
- }
48
- });
49
- }
50
23
  /*
51
24
  * Levenshtein distance, from the `js-levenshtein` NPM module.
52
25
  * Copied here to avoid complexity of adding another CommonJS module dependency.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenfs/core",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "A filesystem in your browser",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist",