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

stream-promise

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stream-promise - npm Package Compare versions

Comparing version

to
2.0.0

.editorconfig

30

index.js

@@ -1,23 +0,15 @@

'use strict';
var Writable = require('io-stream').Writable;
var Promise = global.Promise || require('lie');
var inherits = require('inherits');
"use strict";
module.exports = StreamPromise;
const Stream = require("stream");
inherits(StreamPromise, Writable);
function StreamPromise() {
if (!(this instanceof StreamPromise)) {
return new StreamPromise();
}
Writable.call(this, {
objectMode: true
});
class StreamEmitter extends Promise {
constructor(executor) {
super(executor);
Stream.call(this);
}
}
StreamPromise.prototype._write = function (chunk, _, next) {
Promise.resolve(chunk).then(function () {
next();
}, next);
};
const EventEmitterPrototype = Object.getPrototypeOf(Stream.prototype);
Object.assign(StreamEmitter.prototype, EventEmitterPrototype, Stream.prototype);
module.exports = StreamEmitter;
{
"name": "stream-promise",
"version": "1.0.0",
"description": "writable stream which resolves promises",
"main": "index.js",
"scripts": {
"test": "node test.js | tspec"
},
"repository": {
"type": "git",
"url": "git+https://github.com/calvinmetcalf/stream-promise.git"
},
"version": "2.0.0",
"description": "Promise that shares Node.js Stream interface",
"author": "Mariusz Nowak <medyk@medikoo.com> (http://www.medikoo.com/)",
"keywords": [
"promise",
"stream",
"promise"
"emitter",
"event-emitter"
],
"author": "Calvin W. Metcalf <calvin.metcalf@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/calvinmetcalf/stream-promise/issues"
},
"homepage": "https://github.com/calvinmetcalf/stream-promise#readme",
"repository": "medikoo/stream-promise",
"devDependencies": {
"tap-spec": "^4.0.0",
"tape": "^4.0.0"
"chai": "^4.2",
"eslint": "^5.12",
"eslint-config-medikoo": "^2",
"mocha": "^5.2",
"nyc": "^13.1"
},
"dependencies": {
"inherits": "^2.0.1",
"io-stream": "^2.0.2",
"lie": "^2.9.1"
}
"eslintConfig": {
"extends": "medikoo",
"root": true,
"env": {
"node": true
},
"overrides": [
{
"files": "test/**/*.js",
"env": {
"mocha": true
}
}
]
},
"scripts": {
"coverage": "nyc --reporter=lcov --reporter=html --reporter=text-summary npm test",
"check-coverage": "npm run coverage && nyc check-coverage --statements 80 --function 80 --branches 50 --lines 80",
"lint": "eslint --ignore-path=.gitignore .",
"test": "mocha \"test/**.js\""
},
"license": "ISC"
}