Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
console-substitute
Advanced tools
Polyfill for the String Substitutions by console.
The console
of web browser supports the String Substitutions. It is very useful for debugging, etc.
For example, the multiple variables don't have to be joined by +
:
console.info('userName: %s, index: %i', userName, index);
Output:
userName: foo, index: 123
But some browsers such as Android browser, etc. don't support it. A big problem is that all arguments except a first argument (i.e. important informations more than first one) are ignored.
This polyfill implements the String Substitutions to the console that does not support it. This does nothing if the console already supports it.
<script src="console-substitute.min"></script>
The following methods support the String Substitutions:
console.log
console.info
console.error
console.warn
The following substitution strings are supported:
%o
%d
%i
%s
%f
FAQs
Polyfill for the String Substitutions by console.
The npm package console-substitute receives a total of 1 weekly downloads. As such, console-substitute popularity was classified as not popular.
We found that console-substitute demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.