Skip to content

Commit 77c2c79

Browse files
committed
Update docs
1 parent fbcb0ce commit 77c2c79

File tree

1 file changed

+79
-17
lines changed

1 file changed

+79
-17
lines changed

readme.md

Lines changed: 79 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,57 @@
66
[![Size][size-badge]][size]
77

88
List of known MathML tag names.
9-
Includes the elements from [MathML 1][mathml1], [MathML 2][mathml2], and
9+
10+
## Contents
11+
12+
* [What is this?](#what-is-this)
13+
* [When should I use this?](#when-should-i-use-this)
14+
* [Install](#install)
15+
* [Use](#use)
16+
* [API](#api)
17+
* [`mathmlTagNames`](#mathmltagnames)
18+
* [Types](#types)
19+
* [Compatibility](#compatibility)
20+
* [Security](#security)
21+
* [Related](#related)
22+
* [Contribute](#contribute)
23+
* [License](#license)
24+
25+
## What is this?
26+
27+
This is a list of MathML tag names.
28+
It includes all tag names from [MathML 1][mathml1], [MathML 2][mathml2], and
1029
[MathML 3][mathml3].
30+
The repo is includes scripts to regenerate the data from the specs.
1131

12-
The repo contains a script to crawl specs to include newly introduced tag names.
32+
## When should I use this?
1333

14-
## Install
34+
You can use this package when you need to know what tag names are allowed in
35+
any version of MathML.
1536

16-
This package is ESM only: Node 12+ is needed to use it and it must be `import`ed
17-
instead of `require`d.
37+
## Install
1838

19-
[npm][]:
39+
This package is [ESM only][esm].
40+
In Node.js (version 12.20+, 14.14+, or 16.0+), install with [npm][]:
2041

2142
```sh
2243
npm install mathml-tag-names
2344
```
2445

46+
In Deno with [Skypack][]:
47+
48+
```js
49+
import {mathmlTagNames} from 'https://cdn.skypack.dev/mathml-tag-names@3?dts'
50+
```
51+
52+
In browsers with [Skypack][]:
53+
54+
```html
55+
<script type="module">
56+
import {mathmlTagNames} from 'https://cdn.skypack.dev/mathml-tag-names@3?min'
57+
</script>
58+
```
59+
2560
## Use
2661

2762
```js
@@ -56,20 +91,39 @@ There is no default export.
5691

5792
### `mathmlTagNames`
5893

59-
`string[]` — List of lowercase tag names.
94+
List of known (lowercase) MathML tag names (`Array<string>`).
95+
96+
## Types
97+
98+
This package is fully typed with [TypeScript][].
99+
100+
## Compatibility
101+
102+
This package is at least compatible with all maintained versions of Node.js.
103+
As of now, that is Node.js 12.20+, 14.14+, and 16.0+.
104+
It also works in Deno and modern browsers.
105+
106+
## Security
107+
108+
This package is safe.
60109

61110
## Related
62111

63-
* [`html-tag-names`](https://github.com/wooorm/html-tag-names)
64-
— List of HTML tags
65-
* [`svg-tag-names`](https://github.com/wooorm/svg-tag-names)
66-
— List of SVG tags
67-
* [`svg-element-attributes`](https://github.com/wooorm/svg-element-attributes)
68-
— Map of SVG elements to allowed attributes
69-
* [`html-element-attributes`](https://github.com/wooorm/html-element-attributes)
70-
— Map of HTML elements to allowed attributes
71-
* [`aria-attributes`](https://github.com/wooorm/aria-attributes)
72-
— List of ARIA attributes
112+
* [`wooorm/html-tag-names`](https://github.com/wooorm/html-tag-names)
113+
— list of HTML tag names
114+
* [`wooorm/svg-tag-names`](https://github.com/wooorm/svg-tag-names)
115+
— list of SVG tag names
116+
* [`wooorm/svg-element-attributes`](https://github.com/wooorm/svg-element-attributes)
117+
— map of SVG elements to attributes
118+
* [`wooorm/html-element-attributes`](https://github.com/wooorm/html-element-attributes)
119+
— map of HTML elements to attributes
120+
* [`wooorm/aria-attributes`](https://github.com/wooorm/aria-attributes)
121+
— list of ARIA attributes
122+
123+
## Contribute
124+
125+
Yes please!
126+
See [How to Contribute to Open Source][contribute].
73127

74128
## License
75129

@@ -95,10 +149,18 @@ There is no default export.
95149

96150
[npm]: https://docs.npmjs.com/cli/install
97151

152+
[skypack]: https://www.skypack.dev
153+
98154
[license]: license
99155

100156
[author]: https://wooorm.com
101157

158+
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
159+
160+
[typescript]: https://www.typescriptlang.org
161+
162+
[contribute]: https://opensource.guide/how-to-contribute/
163+
102164
[mathml1]: https://www.w3.org/TR/1998/REC-MathML-19980407/appendixF.html
103165

104166
[mathml2]: https://www.w3.org/TR/MathML2/appendixl.html

0 commit comments

Comments
 (0)