Skip to content

rjz/twitter-intent

Repository files navigation

Twitter Intent

Build Status Coverage Status

A utility for building twitter intents

Example

ES5

var twitterIntent = require('twitter-intent');
var href = twitterIntent.tweet.url({
  text: 'Tweet me!',
  hashtags: ['node.js', 'npm']
});

console.log('<a href="' + href + '">Click me!</a>');

ES6

import twitterIntent from 'twitter-intent';

const href = twitterIntent.tweet.url({
  text: 'Tweet me!',
  hashtags: ['node.js', 'npm']
});

console.log('<a href="' + href + '">Click me!</a>');

Installation

Clone this repository:

$ npm install twitter-intent

Testing

Lint and run test suite:

$ npm test

License

MIT