Skip to content

Your example doesn't work... #23

Description

@Soneji
// expand an URL
const unshortener = require("unshortener");

// you can pass in a url object or string
unshortener.expand("http://t.co/rWP6BP3", (_err, url) => {
    // url is a url object
    console.log(url);
});

Gives:

Url {
  protocol: 'https:',
  slashes: true,
  auth: null,
  host: 'www.facebook.com',
  port: 443,
  hostname: 'www.facebook.com',
  hash: null,
  search: null,
  query: null,
  pathname: '/unsupportedbrowser',
  path: '/unsupportedbrowser',
  href: 'https://www.facebook.com/unsupportedbrowser'
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions