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.
makeup-next-id
Advanced tools
Assign the next id in sequence to an element, if an id property does not already exist.
Assigns the next id in sequence to an element, if an id property does not already exist.
A vanilla JavaScript port of jquery-next-id.
This module is still in an experimental state, until it reaches v1.0.0 you must consider all minor releases as breaking changes. Patch releases may introduce new features, but will be backwards compatible.
// via npm
npm install makeup-next-id
// via yarn
yarn add makeup-next-id
// require the module
const nextId = require('makeup-next-id');
// get NodeList
const widgets = document.querySelectorAll('.widget');
// assign next id to each element
widgets.forEach(function(el) {
nextId(el, 'widget');
});
Markup before:
<div class="widget"></div>
<div class="widget"></div>
<div class="widget"></div>
Markup after:
<div class="widget" id="widget-1"></div>
<div class="widget" id="widget-2"></div>
<div class="widget" id="widget-3"></div>
npm start
npm test
npm run lint
npm run fix
npm run build
npm run clean
Each test run will generate the following reports:
/reports/coverage
contains Istanbul code coverage report/reports/html
contains HTML test reporthttps://travis-ci.org/makeup-js/makeup-next-id
FAQs
Assign the next id in sequence to an element, if an id property does not already exist.
The npm package makeup-next-id receives a total of 95 weekly downloads. As such, makeup-next-id popularity was classified as not popular.
We found that makeup-next-id demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.