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.
hokey-cokey
Advanced tools
Render values into templates OR extract values out of templates. That's what it's all about.
Hokey Cokey is a quick tool for extracting parameters from, and inserting parameters into, template strings:
places/france/paris/
) against a template (e.g. places/:country/{city}
){ country: "france", city: "paris" }
)places/${country}/:city
) and an object of values (e.g. { country: "france", city: "paris" }
)places/france/paris/
).Things to know:
:express
, {jsx}
, {{handlebars}}
or ${es6}
format.*
glob patterns, or optional parameters).[a-zA-Z][a-zA-Z0-9]
.npm install hokey-cokey
extract()
: Get values out of a templateconst { extract } = require('hokey-cokey');
const values = extract("places/{country}/{city}", "places/france/paris");
// { country: "france", city: "paris" }
console.log(values);
render()
: Inject values into a templateconst { render } = require("hokey-cokey");
const output = render("blogs/:category/:slug", { category: "cheeses", slug: "stilton" });
// "places/france/paris"
console.log(output);
FAQs
Render values into templates OR extract values out of templates. That's what it's all about.
The npm package hokey-cokey receives a total of 1 weekly downloads. As such, hokey-cokey popularity was classified as not popular.
We found that hokey-cokey 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.