# @nahkd123/fastdom

> Manipulate DOM faster

Latest version **1.0.0** (published 2022-05-11) · GPL-3.0-or-later license · 0 weekly downloads

## Install

```sh
npm install @nahkd123/fastdom
pnpm add @nahkd123/fastdom
yarn add @nahkd123/fastdom
bun add @nahkd123/fastdom
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-05-11 |
| First published | 2022-05-11 |
| Weekly downloads | 0 |
| License | GPL-3.0-or-later |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 40.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | nahkd123 |
| Maintainers | nahkd123 |
| Keywords | dom, html5 |

## Links

- npm: https://www.npmjs.com/package/@nahkd123/fastdom
- Repository: https://github.com/nahkd123/fastdom
- Homepage: https://github.com/nahkd123/fastdom#readme
- Issues: https://github.com/nahkd123/fastdom/issues
- npm.io page: https://npm.io/package/@nahkd123/fastdom

## 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.0.0 (latest) — 2022-05-11

## README

# fastdom
A relatively small package for manipulating DOM a little bit faster. Surely it won't be 1.5GB worth of ``node_modules`` hell.

## Installing and using fastdom
Install fastdom:
```sh
npm i @nahkd123/fastdom
```

Using fastdom with bundler:
```js
const fd = require("@nahkd123/fastdom")

// Target our document body and do something with it...
new fd.Target(document.body).generator(function*() {
    // You can yield HTMLElement...
    yield document.createElement("div")

    // ...or you can yield targeted element!
    yield fd.create("span").with(s => s.textContent = "Hello there!")
})
```

Using fastdom obtained from Skypack CDN:
```html
<head>
    <script src="https://cdn.skypack.dev/@nahkd123/fastdom"></script>
</head>
<body>
    <script>
        new fastdom.Target(document.body).generator(function*() {
            yield fastdom.create("span").with(s => s.textContent = "Hello there!")
        })
    </script>
</body>
```

## Build fastdom
```sh
# One-time build
# (run any of these commands)
npm run build
tsc -b                   # If you have TypeScript installed globally

# Watching changes
npm run build:watch
tsc --watch              # If you have TypeScript installed globally
```

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