package
Parse an HTML attribute value containing link types.
npm install link-typesGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 1 packages.
4.7 kB
Includes dependencies.
Parse an HTML attribute value containing link types.
Note: this library is not responsible for parsing any HTML.
Node.js >= 8 is required. To install, type this at the command line:
npm install link-typesconst linkTypes = require('link-types');
linkTypes('nofollow');
//-> ['nofollow']
linkTypes(' tag NOFOLLOW ');
//-> ['tag', 'nofollow']
linkTypes.map(' tag NOFOLLOW ');
//-> { tag:true, nofollow:true }