![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@intuned/finder
Advanced tools
The CSS Selector Generator
npm install @medv/finder
import {finder} from '@medv/finder'
document.addEventListener('click', event => {
const selector = finder(event.target)
console.log(selector)
})
An example of a generated selector:
.blog > article:nth-child(3) .add-comment
const selector = finder(event.target, {
root: document.body, // Root of search, defaults to document.body.
idName: (name) => true, // Check if this ID can be used.
className: (name) => true, // Check if this class name can be used.
tagName: (name) => true, // Check if tag name can be used.
attr: (name, value) => false, // Check if attr name can be used.
seedMinLength: 1,
optimizedMinLength: 2,
threshold: 1000,
maxNumberOfTries: 10_000,
})
Minimum length of levels in fining selector. Starts from 1
.
For more robust selectors give this param value around 4-5 depending on depth of
you DOM tree. If finder hits the root
, this param is ignored.
Minimum length for optimising selector. Starts from 2
.
For example selector body > div > div > p
can be optimised to body p
.
Max number of selectors to check before falling into nth-child
usage.
Checking for uniqueness of selector is very costly operation, if you have DOM
tree depth of 5, with 5 classes on each level, that gives you more than 3k
selectors to check. Default 1000
is good enough in most cases.
Max number of tries for the optimization. This is a trade-off between
optimization and efficiency. Default 10_000
is good enough in most cases.
Every line of code in my repositories 📖 signifies my unwavering commitment to open source 💡. Your support 🤝 ensures these projects keep thriving, innovating, and benefiting all 💼. If my work has ever resonated 🎵 or helped you, kindly consider showing love ❤️ by sponsoring. 🚀 Sponsor Me Today! 🚀
FAQs
CSS Selector Generator
We found that @intuned/finder demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.