JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2568
  • Score
    100M100P100Q162691F
  • License MIT

Linkify URLs in text

Package Exports

  • linkify-urls

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (linkify-urls) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

linkify-urls Build Status

Linkify URLs in text

Install

$ npm install linkify-urls

Usage

const linkifyUrls = require('linkify-urls');

linkifyUrls('See https://sindresorhus.com', {
    attributes: {
        class: 'unicorn'
    }
});
//=> 'See <a href="https://sindresorhus.com" class="unicorn">https://sindresorhus.com</a>'

API

linkifyUrls(input, [options])

input

Type: string

Text with URLs to linkify.

options

Type: Object

attributes

Type: Object

HTML attributes to add to the link.

License

MIT © Sindre Sorhus