Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
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 7 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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.