Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Your example doesn't work... #23

Open
Soneji opened this issue Sep 17, 2021 · 0 comments
Open

Your example doesn't work... #23

Soneji opened this issue Sep 17, 2021 · 0 comments

Comments

@Soneji
Copy link

Soneji commented Sep 17, 2021

// 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'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant