An open API service indexing awesome lists of open source software.

https://github.com/wooorm/a-rel

List of link types for `rel` on `a` and `area`
https://github.com/wooorm/a-rel

a area html rel

Last synced: 6 months ago
JSON representation

List of link types for `rel` on `a` and `area`

Awesome Lists containing this project

README

          

# a-rel

[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][size]

List of values for `rel` on `` and `` elements according to
[Microformats][].

## Contents

* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`aRel`](#arel)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Related](#related)
* [Contribute](#contribute)
* [License](#license)

## What is this?

This package lists values that are allowed in `rel` attributes on `` and
`` elements.
These values come from [Microformats][].

## When should I use this?

Use this package for a list of Microformats extensions on `` and ``
elements.
See [`link-rel`][link-rel] for a list of Microformats extensions to ``
and [`html-link-types`][html-link-types] if you specifically need to check which
values are allowed by the HTML spec.

## Install

This package is [ESM only][esm].
In Node.js (version 14.14+, 16.0+), install with [npm][]:

```sh
npm install a-rel
```

In Deno with [`esm.sh`][esmsh]:

```js
import {aRel} from 'https://esm.sh/a-rel@3'
```

In browsers with [`esm.sh`][esmsh]:

```html

import {aRel} from 'https://esm.sh/a-rel@3?bundle'

```

## Use

```js
import {aRel} from 'a-rel'

console.log(aRel.slice(0, 10))
```

Yields:

```js
[
'about',
'acquaintance',
'alternate',
'amphtml',
'appendix',
'archived',
'attachment',
'bookmark',
'canonical',
'category'
]
```

## API

This package exports the identifier `aRel`.
There is no default export.

### `aRel`

List of lowercase types (`Array`).

## Types

This package is fully typed with [TypeScript][].
It exports no additional types.

## Compatibility

This package is at least compatible with all maintained versions of Node.js.
As of now, that is Node.js 14.14+ and 16.0+.
It also works in Deno and modern browsers.

## Security

This package is safe.

## Related

* [`wooorm/html-link-types`][html-link-types]
— list of link types for `rel` according to HTML
* [`wooorm/link-rel`][link-rel]
— list of link types for `rel` on `link`
* [`wooorm/aria-attributes`](https://github.com/wooorm/aria-attributes)
— list of ARIA attributes
* [`wooorm/html-dangerous-encodings`](https://github.com/wooorm/html-dangerous-encodings)
— list of dangerous HTML character encoding labels
* [`wooorm/html-encodings`](https://github.com/wooorm/html-encodings)
— list of HTML character encoding labels
* [`wooorm/meta-name`](https://github.com/wooorm/meta-name)
— list of values for `name` on `meta`
* [`wooorm/web-namespaces`](https://github.com/wooorm/web-namespaces)
— map of web namespaces

## Contribute

Yes please!
See [How to Contribute to Open Source][contribute].

## License

[MIT][license] © [Titus Wormer][author]

[build-badge]: https://github.com/wooorm/a-rel/workflows/main/badge.svg

[build]: https://github.com/wooorm/a-rel/actions

[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/a-rel.svg

[coverage]: https://codecov.io/github/wooorm/a-rel

[downloads-badge]: https://img.shields.io/npm/dm/a-rel.svg

[downloads]: https://www.npmjs.com/package/a-rel

[size-badge]: https://img.shields.io/bundlephobia/minzip/a-rel.svg

[size]: https://bundlephobia.com/result?p=a-rel

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

[esmsh]: https://esm.sh

[license]: license

[author]: https://wooorm.com

[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

[typescript]: https://www.typescriptlang.org

[contribute]: https://opensource.guide/how-to-contribute/

[microformats]: http://microformats.org/wiki/existing-rel-values

[link-rel]: https://github.com/wooorm/link-rel

[html-link-types]: https://github.com/wooorm/html-link-types