# nodetype-enum

> An enum of HTML DOM node types

Latest version **1.1.1** (published 2016-07-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install nodetype-enum
pnpm add nodetype-enum
yarn add nodetype-enum
bun add nodetype-enum
```

## 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.1.1 |
| Published | 2016-07-05 |
| First published | 2016-07-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Nik Coughlin |
| Maintainers | nrkn |
| Keywords | node, dom, html, type, enum |

## Links

- npm: https://www.npmjs.com/package/nodetype-enum
- Repository: https://github.com/nrkn/nodetype-enum
- Homepage: https://github.com/nrkn/nodetype-enum#readme
- Issues: https://github.com/nrkn/nodetype-enum/issues
- npm.io page: https://npm.io/package/nodetype-enum

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2016-07-05
- 1.1.0 — 2016-07-05
- 1.0.0 — 2016-07-05

## README

# nodetype-enum

## An enum of HTML DOM node types

```javascript
{
  1: 'element',
  3: 'text',
  7: 'processingInstruction',
  8: 'comment',
  9: 'document',
  10: 'documentType',
  11: 'documentFragment',
  element: 1,
  text: 3,
  processingInstruction: 7,
  comment: 8,
  document: 9,
  documentType: 10,
  documentFragment: 11
}
```

See [Node.nodeType at MDN](https://developer.mozilla.org/en/docs/Web/API/Node/nodeType)

### Install

`npm install nodetype-enum`

### Usage

```javascript
const nodeType = require( 'nodetype-enum' )

console.log( nodeType.element ) // 1
console.log( nodeType[ 1 ] ) // 'element'

//get a fresh instance
const fresh = nodeType()

console.log( fresh.element ) // 1

delete fresh.element

console.log( fresh.element ) // undefined

console.log( nodeType.element ) // 1
```

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