tweet-links

extract links from tweet

Usage no npm install needed!

<script type="module">
  import tweetLinks from 'https://cdn.skypack.dev/tweet-links';
</script>

README

tweet-links

NPM version Build Status Coveralls Status Dependency Status

extract links from tweet

Install

npm install --save tweet-links

Usage

import tweetLinks from 'tweet-links';

import zero from './fixtures/zero.json';
import one  from './fixtures/one.json';
import two  from './fixtures/two.json';

tweetLinks(zero); // []
tweetLinks(one);  // [ 'https://medium.com/the-year-of-the-looking-glass/a-managers-manifesto-be5f6b118084' ]
tweetLinks(two);  // [ 'http://html5.by/blog/nwjs/', 'http://buznik.net/lifeChart/' ]
tweetLinks();     // undefined ¯\_(ツ)_/¯

API

tweetLinks(input)

input

Required
Type: Object

Tweet Object from Twitter API.

Related

License

MIT © Vladimir Starkov