base-twitter-link

1.0.1 • Public • Published

base-twitter-link Build Status

A basic link to your Twitter built with base-element

Install

$ npm install --save base-twitter-link

Usage

var TwitterLink = require('base-twitter-link')
new TwitterLink().toString('bendrucker')
<a href="https://twitter.com/bendrucker" rel="me" title="Follow me on Twitter @bendrucker">@bendrucker</a>

API

new TwitterLink([el]) -> link

el

Type: HTMLElement

The optional HTML element to append to.

link.render(username) -> vdom

username

Required
Type: string / object

Your username. Optionally, pass an object with properties for the <a> element like title to override the defaults.

link.toString(username) -> html

Same signature as link.render, returning an html string instead of vdom.

License

MIT © Ben Drucker

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    1
  • 1.0.0
    1

Package Sidebar

Install

npm i base-twitter-link

Weekly Downloads

2

Version

1.0.1

License

MIT

Last publish

Collaborators

  • bendrucker