Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

diskette

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diskette - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

7

build/File.js

@@ -36,2 +36,7 @@ /// <reference path="typings/main.d.ts" />

};
File.prototype.clear = function () {
this.blocks = [];
this.size = 0;
// GC takes care of the rest
};
File.prototype.write = function (position, buffer, start, end) {

@@ -86,2 +91,2 @@ if (start === void 0) { start = 0; }

exports.File = File;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRmlsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL0ZpbGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsMENBQTBDOztBQUUxQyxJQUFZLE1BQU0sV0FBTSxhQUV4QixDQUFDLENBRm9DO0FBTXJDO0lBTUUsY0FBWSxnQkFBZ0QsRUFBRSxPQUFRO1FBQ3BFLElBQUksT0FBTyxHQUFHLElBQUksQ0FBQTtRQUNsQixFQUFFLENBQUMsQ0FBQyxnQkFBZ0IsWUFBWSxNQUFNLElBQUksT0FBTSxDQUFDLGdCQUFnQixDQUFDLEtBQUssUUFBUSxDQUFDO1lBQzlFLE9BQU8sR0FBRyxnQkFBZ0IsQ0FBQTtRQUM1QixJQUFJLENBQUMsRUFBRSxDQUFBLENBQUMsZ0JBQWdCLENBQUMsQ0FBQyxDQUFDO1lBQ3pCLE9BQU8sR0FBRyxnQkFBZ0IsQ0FBQTtRQUM1QixDQUFDO1FBQ0QsT0FBTyxHQUFHLE9BQU8sSUFBSSxFQUFFLENBQUE7UUFFdkIsRUFBRSxDQUFDLENBQUMsT0FBTSxDQUFDLE9BQU8sQ0FBQyxLQUFLLFFBQVEsQ0FBQztZQUMvQixNQUFNLElBQUksS0FBSyxDQUF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UsS0FBSyxFQUFFLENBQUMsQ0FBQyxDQUFBO1lBQ2hELElBQUksU0FBUyxHQUFHLEdBQUcsR0FBRyxLQUFLLENBQUE7WUFDM0IsSUFBSSxDQUFDLE1BQU0sQ0FBQyxXQUFXLENBQUMsQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFLEtBQUssRUFBRSxDQUFDLEVBQUUsSUFBSSxDQUFDLFdBQVcsR0FBRyxTQUFTLENBQUMsQ0FBQTtRQUMvRSxDQUFDO0lBQ0gsQ0FBQztJQUVELHFCQUFNLEdBQU4sVUFBTyxrQkFBc0IsRUFBRSxrQkFBc0I7UUFBOUMsa0NBQXNCLEdBQXRCLHNCQUFzQjtRQUFFLGtDQUFzQixHQUF0QixzQkFBc0I7UUFDbkQsSUFBSSxNQUFNLEdBQUcsSUFBSSxNQUFNLENBQUMsSUFBSSxDQUFDLElBQUksR0FBRyxrQkFBa0IsR0FBRyxrQkFBa0IsQ0FBQyxDQUFBO1FBQzVFLElBQUksQ0FBQyxJQUFJLENBQUMsa0JBQWtCLEVBQUUsTUFBTSxDQUFDLENBQUE7UUFDckMsTUFBTSxDQUFDLE1BQU0sQ0FBQTtJQUNmLENBQUM7SUFFRCx1QkFBUSxHQUFSLFVBQVMsR0FBRztRQUNWLE1BQU0sQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFLENBQUMsUUFBUSxDQUFDLEdBQUcsQ0FBQyxDQUFBO0lBQ3BDLENBQUM7SUFDSCxXQUFDO0FBQUQsQ0FBQyxBQTNHRCxJQTJHQztBQTNHWSxZQUFJLE9BMkdoQixDQUFBIn0=

@@ -12,3 +12,3 @@

blocks: [Buffer]
blocks: Buffer[]
size: number

@@ -57,2 +57,8 @@ blockLength: number;

clear() {
this.blocks = []
this.size = 0
// GC takes care of the rest
}
write(position: number, buffer: Buffer | string, start: number = 0, end: number = buffer.length) {

@@ -59,0 +65,0 @@

2

package.json
{
"name": "diskette",
"version": "1.1.0",
"version": "1.2.0",
"description": "Stream buffers and strings efficiently in-memory",

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

@@ -81,2 +81,14 @@ Diskette

#### file.allocateBlock()
Allocates a new block for writing content. This method is automatically called by the class, and generally should not be used.
#### file.totalLength()
Returns the total space the file occupies in-memory, including unused free space.
#### file.clear()
Clears all content of file by destroying the blocks, making it seem like an empty file was just created.
### ReadableFileStream

@@ -83,0 +95,0 @@

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