Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

@ta-interaktiv/share-url-factory

2.0.0 • Public • Published

Share URL Factory

Installation

yarn add @ta-interaktiv/share-url-factory

Usage

import { shareURLFactory } from '@ta-interaktiv/share-url-factory'
 
let twitterUrl = shareURLFactory['twitter']({
  url: 'http://interaktiv.tagesanzeiger.ch/2017/grossartiges-werk',
  via: 'tagesanzeiger',
  title: 'Schaut euch diese grossartige Grafik an!',
  hashtags: ['TAGrafik', 'awesome']
})
 
let facebookUrl = shareURLFactory['facebook']({
  url: 'http://interaktiv.tagesanzeiger.ch/2017/grossartiges-werk',
  facebook_id: 123, // Facebook App ID, doesn't work without it.
  hashtags: ['TAGrafik'] // Also as an array, but will only use the first
  // item.
})

Documentation

Can be found here.

Install

npm i @ta-interaktiv/share-url-factory

DownloadsWeekly Downloads

110

Version

2.0.0

License

ISC

Unpacked Size

29.3 kB

Total Files

13

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar