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

satcheljs-trace

Package Overview
Dependencies
Maintainers
3
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

satcheljs-trace - npm Package Compare versions

Comparing version 2.11.0 to 2.12.0

1

lib/trace.d.ts

@@ -0,2 +1,3 @@

/// <reference types="es6-promise" />
import { DispatchFunction, ActionFunction, ActionContext } from 'satcheljs';
export default function trace(next: DispatchFunction, action: ActionFunction, actionType: string, args: IArguments, actionContext: ActionContext): void | Promise<any>;

21

lib/trace.js
"use strict";
var depth = 0;
function trace(next, action, actionType, args, actionContext) {
groupStart("Executing action: " + (actionType ? actionType : "(anonymous action)"));
log("Executing action: " + (actionType ? actionType : "(anonymous action)"));
try {
depth++;
return next(action, actionType, args, actionContext);
}
finally {
groupEnd();
depth--;
}

@@ -13,14 +15,5 @@ }

exports.default = trace;
function groupStart(message) {
if (typeof console.group == "function") {
console.group(message);
}
else {
console.log(message);
}
function log(message) {
var indentation = (new Array(depth + 1)).join(' ');
console.log(indentation + message);
}
function groupEnd() {
if (typeof console.groupEnd == "function") {
console.groupEnd();
}
}
{
"name": "satcheljs-trace",
"version": "2.11.0",
"version": "2.12.0",
"description": "Tracing middleware for SatchelJS.",

@@ -15,3 +15,3 @@ "main": "./lib/index.js",

"dependencies": {
"satcheljs": "2.11.0"
"satcheljs": "2.12.0"
},

@@ -18,0 +18,0 @@ "devDependencies": {

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