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

Package detail

link-types

stevenvachon107.6kMIT3.0.0

Parse an HTML attribute value containing link types.

html, link, rel, seo

readme

link-types NPM Version Build Status

Parse an HTML attribute value containing link types.

Note: this library is not responsible for parsing any HTML.

Installation

Node.js >= 8 is required. To install, type this at the command line:

npm install link-types

Usage

const linkTypes = require('link-types');

linkTypes('nofollow');
//-> ['nofollow']

linkTypes(' tag  NOFOLLOW ');
//-> ['tag', 'nofollow']

linkTypes.map(' tag   NOFOLLOW ');
//-> { tag:true, nofollow:true }