link-types

Parse an HTML attribute value containing link types.

MIT 4 个版本
安装
npm install link-types
yarn add link-types
pnpm add link-types
bun add link-types
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 }
版本列表
3.0.0 2019-04-22
2.0.0 2017-05-11
1.1.0 2016-01-07
1.0.0 2016-01-06