New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

call-log-func

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

call-log-func

a call log function tool

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

call-log-func

a call log function tool

Install

npm install call-log-func

Usage

var call_log_func= require("call-log-func");

var a = [];		//to save result

var func1= function (message) { a.push(message); console.log("log1: " + message); };
call_log_func(func1,"abc1");	//a call back function
//log1: abc1

call_log_func("log2", "abc2");  //a string as logFunc
//log2, abc2
call_log_func("", "abc3");  //an empty string
//abc3

var obj4={
    log: function (message) { a.push(message); console.log("log4: " + message); },
}
call_log_func(obj4, "abc4");  //an object with '.log()' method
//log4: abc4
call_log_func(console, "abc5");  //'console' as an object with '.log()' method
//abc5

call_log_func(null, "abc");
//do nothing		

var expect="abc1,abc4";
//a.join(",")===expect

/*
console output should like:
log1: abc1
log2, abc2
abc3
log4: abc4
abc5
*/

Keywords

log

FAQs

Package last updated on 20 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts