Neoclassical Programming Multitude

    linkify-instagram

    0.6.2 • Public • Published

    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>

    Install

    npm i linkify-instagram

    DownloadsWeekly Downloads

    11

    Version

    0.6.2

    License

    MIT

    Last publish

    Collaborators

    • abh1nav