@iamcal/autolink-js

0.1.1 • Public • Published

autolink-js - JS link formatting library

NPM version NPM downloads Build Status Coverage Status

This library helps to detect URLs (and email addresses) in text, and turn them into links. It is based on the original PHP version here: https://github.com/iamcal/lib_autolink

Installation

Either clone the git repo, or npm install @iamcal/autolink-js

Usage

<script src="autolink.min.js" type="text/javascript"></script>
<script type="text/javascript">

var a = new AutoLink();

// turn some text into linkified HTML
var html = a.link(text);

// also link up email addresses
html = a.linkEmail(text);


// TODO: document options

</script>

Version History

See CHANGES.md

Package Sidebar

Install

npm i @iamcal/autolink-js

Weekly Downloads

1

Version

0.1.1

License

MIT

Unpacked Size

15.8 kB

Total Files

6

Last publish

Collaborators

  • iamcal