Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mskelton/observer

A super simple and performant way to observer specific selectors in the DOM.
https://github.com/mskelton/observer

dom observer

Last synced: 17 days ago
JSON representation

A super simple and performant way to observer specific selectors in the DOM.

Awesome Lists containing this project

README

        

# @mskelton/observer

[![Build status](https://github.com/mskelton/observer/workflows/Build/badge.svg)](https://github.com/mskelton/observer/actions)

## Installation

### npm

```bash
npm install @mskelton/observer
```

### Yarn

```bash
yarn add @mskelton/observer
```

### pnpm

```bash
pnpm add @mskelton/observer
```

## Usage

```javascript
import { observe } from "@mskelton/observer"

observe(".my-selector", (el) => {
// ...
})
```