html-element-map
Look up HTML tag names via HTML Element constructors, and vice versa.
Last updated 3 years 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

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

github actions coverage dependency status dev dependency status License Downloads

npm badge

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.3.1                                ...           latest (3 years ago)

6 Versions

  • 1.3.1                                ...           3 years ago
  • 1.3.0                                ...           4 years ago
  • 1.2.0                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (11)
Dependents (1)

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