# dom-lightning

> A small DOM implementation

Latest version **1.2.0** (published 2020-12-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install dom-lightning
pnpm add dom-lightning
yarn add dom-lightning
bun add dom-lightning
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2020-12-08 |
| First published | 2020-04-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 47.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Kory Nunn |
| Maintainers | korynunn |
| Keywords | dom |

## Links

- npm: https://www.npmjs.com/package/dom-lightning
- Repository: https://github.com/korynunn/dom-lightning
- Homepage: https://github.com/korynunn/dom-lightning#readme
- Issues: https://github.com/korynunn/dom-lightning/issues
- npm.io page: https://npm.io/package/dom-lightning

## Dependencies (1)

- [selector-lite](https://npm.io/package/selector-lite.md) 20.2.0

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.2.0 (latest) — 2020-12-08
- 1.1.0 — 2020-12-08
- 1.0.2 — 2020-04-30
- 1.0.1 — 2020-04-22
- 1.0.0 — 2020-04-22

## README

# dom-lightning

A refactor of [dom-lite](https://github.com/litejs/dom-lite) with some stuff added.

## Development

```bash
npm i
npm test
```

## Examples

```javascript
var document = require("dom-lightning").document;

var el = document.createElement("h1");
el.id = 123;
el.className = "large";

var fragment = document.createDocumentFragment();
var text1 = document.createTextNode("hello");
var text2 = document.createTextNode(" world");

fragment.appendChild(text1);
fragment.appendChild(text2);
el.appendChild(fragment);

el.innerHTML;
// hello world
el.innerHTML = "<b>hello world</b>"
el.outerHTML;
// <h1 id="123" class="large"><b>hello world</b></h1>
el.querySelectorAll("b");
// [ "<b>hello world</b>" ]
```

## Licence

[The MIT License](https://opensource.org/licenses/MIT)

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