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

fm-log

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fm-log - npm Package Compare versions

Comparing version 0.8.0 to 0.8.1

9

lib/log.js

@@ -290,5 +290,8 @@ "use strict";

* @param {String} stack The traced stack
* @param {Number} [stackIndex=2] The element of the stack you want analyzed.
* @returns {String} A location identifier for the location from where the logger was invoked.
*/
var analyzeStack = function( stack ) {
var analyzeStack = function( stack, stackIndex ) {
stackIndex = stackIndex || 2;
/**

@@ -304,6 +307,6 @@ * Group 1: Function name (optional)

// The method that invoked the logger is located at index 2 of the stack
if( sites && 2 <= sites.length ) {
if( sites && stackIndex <= sites.length ) {
var callSiteElementPattern = new RegExp( /at (?:(.*) )?\(?(.*):(\d+):(\d+)\)?/ );
// Pick apart
var callSiteElements = sites[ 2 ].match( callSiteElementPattern );
var callSiteElements = sites[ stackIndex ].match( callSiteElementPattern );
var functionName, fileName, line, column;

@@ -310,0 +313,0 @@ // Assume either 4 (no function name) or 5 elements.

{
"name": "fm-log",
"version": "0.8.0",
"version": "0.8.1",
"description": "Console logging facility for Node",

@@ -5,0 +5,0 @@ "main": "lib/log.js",

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