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

jasmine-json-stream-reporter

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jasmine-json-stream-reporter - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

2

package.json
{
"name": "jasmine-json-stream-reporter",
"version": "0.0.7",
"version": "0.0.8",
"description": "jasmine json stream reporter",

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

@@ -12,4 +12,6 @@ 'use strict';

module.exports = function (reporter) {
module.exports = function (reporters) {
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
if (!Array.isArray(reporters)) reporters = [reporters];
var _options$onError = options.onError;

@@ -20,5 +22,3 @@ var onError = _options$onError === undefined ? function (message) {

var _options$onMessage = options.onMessage;
var onMessage = _options$onMessage === undefined ? function (message) {
return process.stdout.write(message);
} : _options$onMessage;
var onMessage = _options$onMessage === undefined ? function () {} : _options$onMessage;

@@ -34,3 +34,5 @@ var failures = 0;

if (reporter.print) return reporter.print(message);
reporters.forEach(function (reporter) {
return reporter.print && reporter.print(message);
});
onMessage(message);

@@ -41,14 +43,16 @@ }

return through(function (chunk, enc, next) {
for (var key in events) {
if (events.hasOwnProperty(key)) {
var value = events[key];
if (!chunk.id.endsWith(':' + key)) continue;
if (typeof value === 'function') value(chunk);
if (key in reporter) reporter[key](chunk);
break;
}
}
Object.keys(events).find(function (key) {
var value = events[key];
if (!chunk.id.endsWith(':' + key)) return false;
if (typeof value === 'function') value(chunk);
reporters.forEach(function (reporter) {
return key in reporter && reporter[key](chunk);
});
return true;
});
next(null, chunk);
}, function (flush) {
reporter.jasmineDone();
reporters.forEach(function (reporter) {
return reporter.jasmineDone();
});
if (failures) handleFailures.call(this, failures, onError);

@@ -55,0 +59,0 @@ flush();

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