
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.
blingblingjs
Advanced tools
like bling.js, but more bling
npm i blingblingjs
// import the blingbling y'all
import $ from 'blingblingjs' // es6 module
const $ = require('blingblingjs') // commonjs
// or from Pika CDN! https://cdn.pika.dev/blingblingjs/v2
$() // select nodes in document or pass nodes in
$().on // add multiple event listeners to multiple nodes
$().off // remove multiple event listeners from multiple nodes
$().attr // CRUD attributes on nodes
$().map // use native array methods
// get nodes from the document
const btns = $('button') // blingbling always returns an array
const [first_btn] = $('button[primary]') // destructure shortcut for 1st/only match
const btn_spans = $('span', btns) // provide a query context by passing a 2nd param of node/nodes
// cover DOM nodes in bling
const [sugared_single] = $(document.querySelector('button'))
const sugared_buttons = $(document.querySelectorAll('button'))
$('button').forEach(...)
$('button').map(...)
const btns = $('button')
btns.filter(...)
btns.reduce(...)
btns.flatMap(...)
...
// single events
first_btn.on('click', ({target}) => console.log(target))
$('button[primary]').on('click', e => console.log(e))
// multiple events
$('h1').on('click touchend', ({target}) => console.log(target))
// remove events
const log_event = e => console.warn(e) // must have a reference to the original function
main_btn.on('contextmenu', log_event)
main_btn.off('contextmenu', log_event)
// set an attribute
$('button.rad').attr('rad', true)
// set multiple attributes
const [rad_btn] = $('button.rad')
rad_btn.attr({
test: 'foo',
hi: 'bye',
})
// get an attribute
rad_btn.attr('rad') // "true"
rad_btn.attr('hi') // "bye"
// get multiple attributes
$('button').map(btn => ({
tests: btn.attr('tests'),
hi: btn.attr('hi'),
}))
// remove an attribute
rad_btn.attr('hi', null) // set to null to remove
rad_btn.attr('hi') // attribute not found
// remove multiple attributes
btns.attr({
test: null,
hi: null,
})
Developer ergonomics! If you agree with any of the following, you may appreciate this micro library:
document.querySelector
over.. and over..addEventListener
over.. and over..document.querySelectorAll
had array methods on it..node.setAttributes({...})
or even better nodeList.setAttributes({...})
FAQs
like bling.js, but more bling
The npm package blingblingjs receives a total of 27 weekly downloads. As such, blingblingjs popularity was classified as not popular.
We found that blingblingjs 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.