twitter-intent

Utilities for building twitter intents

Usage no npm install needed!

<script type="module">
  import twitterIntent from 'https://cdn.skypack.dev/twitter-intent';
</script>

README

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