# be-composed

> Fire an event with different characteristics from the original event.

Latest version **0.0.8** (published 2022-10-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install be-composed
pnpm add be-composed
yarn add be-composed
bun add be-composed
```

## Health

**Score 30/100 (F)** — status: abandoned.

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

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2022-10-16 |
| First published | 2022-08-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 9.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | anderson.bruce.b@gmail.com |
| Maintainers | bahrus |
| Keywords | web-components, web-component, custom-element, custom-elements |

## Links

- npm: https://www.npmjs.com/package/be-composed
- Repository: https://github.com/bahrus/be-composed
- Homepage: https://github.com/bahrus/be-composed#readme
- Issues: https://github.com/bahrus/be-composed/issues
- npm.io page: https://npm.io/package/be-composed

## Dependencies (2)

- [be-hive](https://npm.io/package/be-hive.md) 0.0.76
- [be-decorated](https://npm.io/package/be-decorated.md) 0.0.182

## Recent versions

- 0.0.8 (latest) — 2022-10-16
- 0.0.7 — 2022-10-15
- 0.0.6 — 2022-10-14
- 0.0.5 — 2022-09-06
- 0.0.4 — 2022-09-04
- 0.0.3 — 2022-08-28
- 0.0.2 — 2022-08-28
- 0.0.1 — 2022-08-23
- 0.0.0 — 2022-08-23

## README

# be-composed

[![Playwright Tests](https://github.com/bahrus/be-composed/actions/workflows/CI.yml/badge.svg)](https://github.com/bahrus/be-composed/actions/workflows/CI.yml)

<a href="https://nodei.co/npm/be-composed/"><img src="https://nodei.co/npm/be-composed.png"></a>

[![How big is this package in your project?](https://img.shields.io/bundlephobia/minzip/be-composed?style=for-the-badge)](https://bundlephobia.com/result?p=be-composed)

<img src="http://img.badgesize.io/https://cdn.jsdelivr.net/npm/be-composed?compression=gzip">

*be-composed* allows us to rebroadcast events that don't bubble or don't "compose" to a different name that *does* bubble and/or compose.

Doing so imposes a bit of an expectation that the name should be namespaced or made unique, to avoid confusing with events from other components. 

In the extreme, we could use a guid, as demonstrated below: 

## Syntax

```html
<input be-composed='{
    "dispatch":{
        "change":{
            "as": "402735ed-b9e8-4ef4-9e0d-3a6b385de863",
            "bubbles": true,
            "composed": true,
            "cancelable": true,
            "stopPropagation": true,
        }
    }
}'>
```

"stopPropagation" prevents the original event from continuing to propagate.  The original event and detail are placed inside the detail of the new event.

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