# vega-event-selector

> A CSS-inspired language to select, sequence, and compose DOM events.

Latest version **4.0.0** (published 2025-03-27) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install vega-event-selector
pnpm add vega-event-selector
yarn add vega-event-selector
bun add vega-event-selector
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2025-03-27 |
| First published | 2016-02-19 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 23.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Vega |
| Maintainers | jheer, domoritz, arvindsatya1, lhermann |
| Keywords | vega, event, selector |

## Links

- npm: https://www.npmjs.com/package/vega-event-selector
- Repository: vega/vega
- npm.io page: https://npm.io/package/vega-event-selector

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 4.0.0 (latest) — 2025-03-27
- 3.0.1 — 2023-03-01
- 3.0.0 — 2021-09-21
- 2.0.6 — 2020-09-23
- 2.0.5 — 2020-08-31
- 2.0.4 — 2020-08-18
- 2.0.3 — 2020-04-27
- 2.0.2 — 2019-12-05
- 2.0.1 — 2019-08-27
- 2.0.0 — 2017-07-01
- 2.0.0-beta — 2017-03-16
- 1.1.0 — 2016-03-25
- 1.0.0 — 2016-02-19

## README

# vega-event-selector

A CSS-inspired language to select, sequence, and compose DOM events into event streams.

Exports the following method:

<a name="parseSelector" href="#parseSelector">#</a>
vega.<b>parseSelector</b>(<i>selector</i>[, <i>source</i>, <i>marks</i>])
[<>](https://github.com/vega/vega/blob/master/packages/vega-event-selector/src/event-selector.js "Source")

Takes an [event _selector_ string](https://vega.github.io/vega/docs/event-streams/#selector) as input and returns a parsed [event stream object](https://vega.github.io/vega/docs/event-streams/#object) definition. The optional _source_ argument takes a string indicating the source value to use by default (normally `"view"`). The optional _marks_ argument takes an object whose keys will be treated as the legal mark types, so long as the corresponding values are truthy. For more, see the [Vega Event Stream documentation](https://vega.github.io/vega/docs/event-streams).

---
_Source: https://npm.io/package/vega-event-selector · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
