
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
string-interp
Advanced tools
A small library to do shell-style string interpolation, with extensions to make it useful to prepare messages shown to the user.
This is the library used to replace placeholders in Thingpedia formatted strings.
const interp = require('string-interp');
// returns "foo bar baz"
interp('foo $p1 ${p2}', { p1: 'bar', p2: 'baz' }, { locale: 'en-US' });
The syntax recognizes parameters preceded by a dollar sign $
.
In the short form, the parameter name follows the dollar sign immediately. In this case, all identifier-like letters following the dollar sign are considered part of the parameter name. Example:
interp('$a $a$aa$a,a', { a: '1', aa: '2' }) === '1 121,a'
In the long form, the parameter name is wrapped in {}
. Use this form if the parameter is immediately
followed by another letter or number. Example:
interp('${a} ${a}a ${aa}', { a: '1', aa: '2' }) === '1 1a 2'
In the long form the parameter can be followed by an option, separated with :
. Options affect how
the parameter value is transformed into a string. Example:
interp('${a} ${a:url}', { a: '/' }) === '/ %2F'
General options:
url
: URL-encode the value with encodeURIComponentOptions for Date
:
iso-date
: format a Date
object as an ISO 8661 string.FAQs
Shell-style string interpolation
The npm package string-interp receives a total of 193 weekly downloads. As such, string-interp popularity was classified as not popular.
We found that string-interp 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.