New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 0.3.1 to 0.4.0

15

build/WritableFileStream.js
"use strict";
var WritableFileStream = (function () {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var stream = require("stream");
var WritableFileStream = (function (_super) {
__extends(WritableFileStream, _super);
function WritableFileStream(file, opts) {
_super.call(this);
opts = opts || {};

@@ -13,7 +21,8 @@ this.file = file;

this.needle += chunk.length;
next();
};
return WritableFileStream;
}());
}(stream.Writable));
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = WritableFileStream;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiV3JpdGFibGVGaWxlU3RyZWFtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vV3JpdGFibGVGaWxlU3RyZWFtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFRQTtJQU1FLDRCQUFZLElBQVUsRUFBRSxJQUFnQztRQUN0RCxJQUFJLEdBQUcsSUFBSSxJQUFJLEVBQUUsQ0FBQTtRQUNqQixJQUFJLENBQUMsSUFBSSxHQUFHLElBQUksQ0FBQTtRQUNoQixJQUFJLENBQUMsTUFBTSxHQUFHLElBQUksQ0FBQyxhQUFhLElBQUksSUFBSSxDQUFDLElBQUksQ0FBQTtJQUMvQyxDQUFDO0lBRUQsbUNBQU0sR0FBTixVQUFPLEtBQXNCLEVBQUUsR0FBVyxFQUFFLElBQUk7UUFDOUMsRUFBRSxDQUFDLENBQUMsT0FBTSxDQUFDLEtBQUssQ0FBQyxLQUFLLFFBQVE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0FBRyxDQUFDLENBQUE7UUFDekMsSUFBSSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxLQUFLLENBQUMsQ0FBQTtRQUNuQyxJQUFJLENBQUMsTUFBTSxJQUFJLEtBQUssQ0FBQyxNQUFNLENBQUE7UUFDM0IsSUFBSSxFQUFFLENBQUE7SUFDUixDQUFDO0lBRUgseUJBQUM7QUFBRCxDQUFDLEFBckJELENBQWdELE1BQU0sQ0FBQyxRQUFRLEdBcUI5RDtBQXJCRDtvQ0FxQkMsQ0FBQSJ9

2

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

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

Diskette
========
> Diskette is a virtual file format that allows for fast reads and writes without reallocation. Files can be constructed from any buffer or string and they are fully streamable. As a consequence, any buffer or string can be streamed as if it was a regular file.
> Diskette is a virtual file format that allows for efficient in-memory reads and writes. Files can be constructed from any buffer or string and they are fully streamable. As a consequence, any buffer or string can be streamed as if it was a regular file.

@@ -23,3 +23,5 @@ ```javascript

file.append('hope you like it')
restStream.on('end', () => {
file.append('hope you like it')
})

@@ -65,3 +67,3 @@ let s = new diskette.ReadableFileStream(file)

Constructs a new [readable stream](https://nodejs.org/api/stream.html#stream_class_stream_readable) of which data of file can be read. The options are:
Constructs a new [readable stream](https://nodejs.org/api/stream.html#stream_class_stream_readable) of which data of file can be read.

@@ -68,0 +70,0 @@ - **chunkSize**: how much data to stream in one cycle. Use `-1` to make the chunk as large as possible (possibly the enitre file content). Defaults to `-1`.

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