instagram-formatter

1.0.1 • Public • Published

Instagram Formatter

Format instagram text to proper html link tag on username, hashtag, and URL This is a fork of tweet-formatter from pveyes

Install

NPM

npm install --save instagram-formatter

Bower

bower install --save instagram-formatter

Example

Node.JS

var instagramFormatter = require('instagram-formatter');
var instagram = 'some instagram text with @username and #hashtag or http://url.com';
 
var formattedInstagram = instagramFormatter(instagram);
console.log(formattedInstagram);
// outputs:
// some instagram text with <a href="http://instagram.com/username">@username</a>
// and <a href="https://twitter.com/search?q=%23hashtag&src=hash">#hashtag</a>
// or <a href="http://url.com">http://url.com</a>

License

MIT

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i instagram-formatter

    Weekly Downloads

    63

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • bmac