
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.
var earls = require('earls')();
earls.map({
'products': '/products',
'products_show': '/products/show/:id'
});
earls.url('products_show', { id: 99 } ); //returns '/products/show/99'
npm install earls
There is also a earl library in npm so make sure you don't forget the s at the end.
Map will just extend the internal url list (object) with the one you pass it.
earls.map({
'products': '/products',
'products_show': '/products/show/:id'
});
You can use map multiple times. It will extend the internal list of urls and not overwrite it.
Mostly map will be enough but incase you like fancy mappings you can register your own mapping method. The method just has to return the same structure as the the default mapping.
earls.register('custom', functionMapper);
earl.custom({}); //Use whatever custom mapping your mapper expects.
A custom mapper that uses functions and works well with Coffee-Script can be found on: earls-function-mapper.
Tests use mocha and should.
make test
FAQs
Tiny library to create a url map
The npm package earls receives a total of 2 weekly downloads. As such, earls popularity was classified as not popular.
We found that earls 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.