Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@justeat/f-dom

Package Overview
Dependencies
Maintainers
17
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@justeat/f-dom

Fozzie JS DOM queries library.

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
17
Created
Source

f-dom

Fozzie Bear

Fozzie JS DOM queries library, built on top of the qwery selector engine.


npm version Build Status Coverage Status Known Vulnerabilities

Adding f-dom to your project

yarn add @justeat/f-dom

Then, inside your script import f-dom.

import $ from '@justeat/f-dom';

Usage

Each method has 2 parameters: mandatory selector and optional root. If root parameter is not specified, search will be performed for all elements in the DOM, otherwise, search will be performed for root child elements.

first method returns first element in the DOM for the specified selector.

const element = $.first('.btn');
...
const element = $.first('#btn', '.container');

all method returns all elements in the DOM for the specified selector.

const element = $.all('.btn');
...
const element = $.all('.btn', '.container');
...
const element = $('.btn'); // short syntax

exists method returns true, if at least one element exists in the DOM, otherwise returns false.

const exists = $.exists('.btn');
...
const exists = $.exists('.btn', '.container');

Keywords

FAQs

Package last updated on 03 Oct 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc