html-element-map
Look up HTML tag names via HTML Element constructors, and vice versa.
Last updated 2 months ago by ljharb .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install html-element-map 
SYNC missed versions from official npm registry.

html-element-map Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Look up HTML tag names via HTML Element constructors, and vice versa.

Entry points

byTag

const assert = require('assert');
const byTag = require('html-element-map/byTag');
// or: import byTag from 'html-element-map/byTag';
// or: import { byTag } from 'html-element-map';

assert.deepEqual(
		byTag('a'),
		[{
				constructor: window.HTMLAnchorElement,
				constructorName: 'HTMLAnchorElement',
				expectedConstructor: window.HTMLAnchorElement,
				tag: 'a'
		}],
);

byConstructor

const assert = require('assert');
const byConstructor = require('html-element-map/byConstructor');
// or: import byConstructor from 'html-element-map/byConstructor';
// or: import { byConstructor } from 'html-element-map';

assert.deepEqual(
		byConstructor(window.HTMLAnchorElement),
		[{
				constructor: window.HTMLAnchorElement,
				constructorName: 'HTMLAnchorElement',
				expectedConstructor: window.HTMLAnchorElement,
				tag: 'a'
		}],
);

byConstructorName

const assert = require('assert');
const byConstructorName = require('html-element-map/byConstructorName');
// or: import byConstructorName from 'html-element-map/byConstructorName';
// or: import { byConstructorName } from 'html-element-map';

assert.deepEqual(
		byConstructorName('HTMLAnchorElement'),
		[{
				constructor: window.HTMLAnchorElement,
				constructorName: 'HTMLAnchorElement',
				expectedConstructor: window.HTMLAnchorElement,
				tag: 'a'
		}],
);

Current Tags

  • 1.4.1                                ...           latest (2 months ago)

8 Versions

  • 1.4.1                                ...           2 months ago
  • 1.4.0                                ...           a year ago
  • 1.3.1                                ...           6 years ago
  • 1.3.0                                ...           6 years ago
  • 1.2.0                                ...           7 years ago
  • 1.1.0                                ...           7 years ago
  • 1.0.1                                ...           8 years ago
  • 1.0.0                                ...           8 years ago
Maintainers (1)
Downloads
Total 42
Today 0
This Week 6
This Month 25
Last Day 1
Last Week 6
Last Month 16
Dependencies (2)
Dev Dependencies (12)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE