instagram-formatter
v1.0.1
Published
Format instagram text with proper html link tag link on username, hashtag, and url
Downloads
214
Maintainers
Readme
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