
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.
data-attributes
Advanced tools
Extract data attributes from a DOM node.
Follows the data-*
spec.
Via npm:
$ npm install data-attributes --save
Via Bower:
$ bower install data-attributes --save
<button data-loading-label="Loading..." data-color="#F06">Click me</button>
<script>
var button = document.querySelector('button');
var data = dataAttributes(button);
data(button); // {loadingLabel: "Loading...", color: "#F06"}
</script>
dataAttributes(element)
Returns an object containing all data attributes (with camel case keys) from a given DOM node.
I needed something like jQuery's $.data()
to simply retrieve data attributes from DOM elements. It was for a very old project that needs to support IE7.
If you do not care about IE7, you can simply use dataset
.
MIT © Rafael Rinaldi
FAQs
Extract data attributes from a DOM node.
The npm package data-attributes receives a total of 138 weekly downloads. As such, data-attributes popularity was classified as not popular.
We found that data-attributes 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.