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

Example does not work... what is twttr? #375

Open
LAMike310 opened this issue Apr 27, 2022 · 0 comments
Open

Example does not work... what is twttr? #375

LAMike310 opened this issue Apr 27, 2022 · 0 comments

Comments

@LAMike310
Copy link

Describe the bug
Example code in the README doesn't work

To Reproduce
Steps to reproduce the behavior:

  1. npm install twitter-text, import twitter from 'twitter-text', twttr.txt.parseTweet(tweet);, run the script
  2. ReferenceError: twttr is not defined

Expected behavior
Example code should work to parse tweet

The fix for this is to write:

var twitter = require('twitter-text');
var tweet = "This is a test tweet";
console.log(twitter.parseTweet(tweet));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant