JSPM

html-element-map

1.3.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1697019
  • Score
    100M100P100Q184438F
  • License MIT

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

Package Exports

  • html-element-map
  • html-element-map/byConstructor
  • html-element-map/byConstructor.js
  • html-element-map/byConstructorName
  • html-element-map/byConstructorName.js
  • html-element-map/byTag
  • html-element-map/byTag.js
  • html-element-map/getData
  • html-element-map/getData.js
  • html-element-map/index
  • html-element-map/index.js
  • html-element-map/package
  • html-element-map/package.json
  • html-element-map/test
  • html-element-map/test/.eslintrc
  • html-element-map/test/byConstructor.js
  • html-element-map/test/byConstructorName.js
  • html-element-map/test/byTag.js
  • html-element-map/test/getData.js
  • html-element-map/test/index.js
  • html-element-map/test/index.mjs

Readme

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'
        }],
);