0.6.2 • Published 8 years ago

linkify-instagram v0.6.2

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

linkify-instagram

npm version Build Status

Click here to try it out in your browser.

Sample Usage

var linkify = require('linkify-instagram');

// Linkifies hashtags
console.log(linkify('Hello #World'));
// Hello <a href="https://www.instagram.com/explore/tags/world">#World</a>

// The hastag template is customizable
console.log(linkify('Hello #World', '<a href="https://www.instagram.com/explore/tags/{hashtag}" target="_blank">#{hashtag}</a>'));
// Hello <a href="https://www.instagram.com/explore/tags/world" target="_blank">#World</a>

// Linkifies usernames
console.log(linkify('Hello @hodor'));
// Hello <a href="https://www.instagram.com/hodor">@hodor</a>

// The template is customizable
console.log(linkify('Hello @hodor', undefined, '<a href="https://www.instagram.com/{username}" target="_blank">@{username}</a>'));
// Hello <a href="https://www.instagram.com/hodor" target="_blank">@hodor</a>
0.6.2

8 years ago

0.6.1

8 years ago

0.6.0

8 years ago

0.5.0

8 years ago

0.4.0

8 years ago

0.3.0

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago