New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@zenfs/core

Package Overview
Dependencies
Maintainers
1
Versions
165
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zenfs/core - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

5

dist/backends/backend.d.ts

@@ -21,5 +21,6 @@ import type { BFSCallback, FileSystem } from '../filesystem.js';

* A custom validation function to check if the option is valid.
* Resolves if valid and rejects if not.
* When async, resolves if valid and rejects if not.
* When sync, it will throw an error if not valid.
*/
validator?(opt: T): Promise<void>;
validator?(opt: T): void | Promise<void>;
}

@@ -26,0 +27,0 @@ /**

@@ -14,12 +14,2 @@ /// <reference types="node" resolution-mode="require"/>

/**
* Copies a slice of the given buffer
* @internal
*/
export declare function copyingSlice(buff: Buffer, start?: number, end?: number): Buffer;
/**
* Option validator for a Buffer file system option.
* @internal
*/
export declare function bufferValidator(v: object): Promise<void>;
/**
* Checks that the given options object is valid for the file system options.

@@ -26,0 +16,0 @@ * @internal

@@ -23,29 +23,2 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

}
/**
* Copies a slice of the given buffer
* @internal
*/
export function copyingSlice(buff, start = 0, end = buff.length) {
if (start < 0 || end < 0 || end > buff.length || start > end) {
throw new TypeError(`Invalid slice bounds on buffer of length ${buff.length}: [${start}, ${end}]`);
}
if (buff.length === 0) {
// Avoid s0 corner case in ArrayBuffer case.
return Buffer.alloc(0);
}
else {
return buff.subarray(start, end);
}
}
/**
* Option validator for a Buffer file system option.
* @internal
*/
export function bufferValidator(v) {
return __awaiter(this, void 0, void 0, function* () {
if (!Buffer.isBuffer(v)) {
throw new ApiError(ErrorCode.EINVAL, 'option must be a Buffer.');
}
});
}
/*

@@ -52,0 +25,0 @@ * Levenshtein distance, from the `js-levenshtein` NPM module.

2

package.json
{
"name": "@zenfs/core",
"version": "0.0.6",
"version": "0.0.7",
"description": "A filesystem in your browser",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc