Socket
Socket
Sign inDemoInstall

dom-node-types

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    dom-node-types

Exports the name/value pairs of DOM Node types


Version published
Maintainers
1
Install size
14.1 kB
Created

Readme

Source

dom-node-types

This module just exports the name/value pairs of DOM Node types. It's trivial, but I find myself needing it regularly and including a dependency on a complete DOM implementation is overkill. I got tired of pasting this around, so it's here.

Installation

npm install dom-node-types

API

ES6:

import { ELEMENT_NODE, TEXT_NODE } from 'dom-node-types';
// or
import * as nodeTypes from 'dom-node-types';

In olden days:

var ELEMENT_NODE = require('dom-node-types').ELEMENT_NODE;
// or
var nodeTypes - require('dom-node-types');

Types

The available types are:

  • ELEMENT_NODE
  • ATTRIBUTE_NODE
  • TEXT_NODE
  • CDATA_SECTION_NODE
  • ENTITY_REFERENCE_NODE
  • ENTITY_NODE
  • PROCESSING_INSTRUCTION_NODE
  • COMMENT_NODE
  • DOCUMENT_NODE
  • DOCUMENT_TYPE_NODE
  • DOCUMENT_FRAGMENT_NODE
  • NOTATION_NODE

Keywords

FAQs

Last updated on 18 Feb 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc