Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stevenvachon/link-types
Parse an HTML attribute value containing link types.
https://github.com/stevenvachon/link-types
attributes html links nodejs rel seo
Last synced: about 2 months ago
JSON representation
Parse an HTML attribute value containing link types.
- Host: GitHub
- URL: https://github.com/stevenvachon/link-types
- Owner: stevenvachon
- License: mit
- Created: 2016-01-06T02:53:27.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-04-22T16:51:44.000Z (over 5 years ago)
- Last Synced: 2024-10-25T11:48:07.728Z (2 months ago)
- Topics: attributes, html, links, nodejs, rel, seo
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
README
# link-types [![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]
> Parse an HTML attribute value containing [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).
Note: this library is not responsible for parsing any HTML.
## Installation
[Node.js](http://nodejs.org/) `>= 8` is required. To install, type this at the command line:
```shell
npm install link-types
```## Usage
```js
const linkTypes = require('link-types');linkTypes('nofollow');
//-> ['nofollow']linkTypes(' tag NOFOLLOW ');
//-> ['tag', 'nofollow']linkTypes.map(' tag NOFOLLOW ');
//-> { tag:true, nofollow:true }
```[npm-image]: https://img.shields.io/npm/v/link-types.svg
[npm-url]: https://npmjs.com/package/link-types
[travis-image]: https://img.shields.io/travis/stevenvachon/link-types.svg
[travis-url]: https://travis-ci.org/stevenvachon/link-types