Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

html-element-map

ljharb7.1mMIT1.3.1

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

html, element, tag, lookup, html, element, constructor

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

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Generated by auto-changelog.

v1.3.1 - 2021-05-19

Commits

  • [readme] add badges and examples e0e01f1
  • [actions] use node/install instead of node/run; use codecov action e28233f
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, function.prototype.name, object-inspect, tape e0ae318
  • [Refactor] use array.prototype.filter instead of array-filter fda63b9
  • [Dev Deps] update eslint, object-inspect 8a542b2
  • [meta] use prepublishOnly script for npm 7+ f5ab052

v1.3.0 - 2021-01-23

Commits

  • [Tests] migrate tests to Github Actions 1a0cce5
  • [New] add ESM wrappers 7b158ed
  • [meta] do not publish github action workflow files 2e8ad37
  • [meta] add "exports" field 89ae540
  • [Tests] run nyc on all tests; use tape runner 1158f19
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, function.prototype.name, object-inspecft, tape f1c295b
  • [actions] add "Allow Edits" workflow ab4c8ab
  • [Robustness] use call-bind ad4ef75
  • [Dev Deps] update eslint, @ljharb/eslint-config, tape, function.prototype.name 5dc88aa
  • [Dev Deps] update @ljharb/eslint-config, tape; add safe-publish-latest 5b3a1a6
  • [actions] switch Automatic Rebase workflow to pull_request_target event 7837752
  • [Dev Deps] update auto-changelog, tape 09a7de6
  • [Dev Deps] update auto-changelog; add aud 124eefd
  • [Tests] only audit prod deps b57ddb4

v1.2.0 - 2019-11-19

Commits

  • [New] add missing elements: 5b3afd9
  • [Tests] use shared travis-ci configs bceebe1
  • [actions] add automatic rebasing / merge commit blocking 2219cb7
  • [meta] add auto-changelog 377cc9a
  • [meta] create FUNDING.yml c1e8765
  • [Dev Deps] update eslint, @ljharb/eslint-config, object-inspect, function.prototype.name 645d278
  • [meta] add funding field 9b75c6e

v1.1.0 - 2019-07-18

Commits

  • [Dev Deps] update eslint, isarray, tape 9a84437
  • [New] add support for main tag b4126b6

v1.0.1 - 2019-03-27

Fixed

  • [Fix] remove applet - it does not exist in modern browsers, and in older ones, it pops up a Java dialog #3

Commits

  • [Tests] use npx aud instead of npm audit with hoops 6b50fe0
  • Remove unused variables a9405d1

v1.0.0 - 2019-01-27

Commits

  • Implementation and tests. 89ed6e8
  • Initial commit a96566c
  • package.json 13bef99
  • byConstructor: no need to throw when passed the wrong kind of thing d0944d1
  • [Tests] add npm run lint c3d3a8b
  • [Tests] add npm run audit in posttest 1217bd8
  • Only apps should have lockfiles 1d41375