# singleton-dom

> Tiny function for insert or find dom element for virtual dom container ( e.g. ReactDom.render )

Latest version **1.0.0** (published 2016-09-01) · ISC license · 0 weekly downloads

## Install

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

## 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.0.0 |
| Published | 2016-09-01 |
| First published | 2016-09-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | inuscript |
| Maintainers | inuscript |
| Keywords | element, dom, createElement, getElementById |

## Links

- npm: https://www.npmjs.com/package/singleton-dom
- npm.io page: https://npm.io/package/singleton-dom

## 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) — 2016-09-01
- 0.0.1 — 2016-09-01

## README

# single-dom
Tiny function for insert or find dom element for virtual dom container ( e.g. ReactDom.render )

# Usage

```js
var singletonDom = require('singleton-dom')

singletonDom('my-container') // insert <div id="my-container"></div> and return element
singletonDom('my-container2') // insert <div id="my-container2"></div> and return element
singletonDom('my-container2') // Not insert and return my-container2 element
```

## with react

```js
import ReactDom from 'react'
import singletonDom from 'singleton-dom'

const App = () => (
  <div>Hello World</div>
)

ReactDom.render(<App />, singletonDom('my-container'))
```

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