{"id":23670801,"url":"https://github.com/jeffreymorganio/tweet-utils-js","last_synced_at":"2026-05-09T00:12:45.637Z","repository":{"id":35904479,"uuid":"40191303","full_name":"jeffreymorganio/tweet-utils-js","owner":"jeffreymorganio","description":"A JavaScript library of functions for working with tweets in JSON format return by the Twitter API.","archived":false,"fork":false,"pushed_at":"2020-08-19T13:35:41.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-16T09:40:12.909Z","etag":null,"topics":["json","nodejs","twitter"],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeffreymorganio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-04T14:58:46.000Z","updated_at":"2020-08-19T13:35:00.000Z","dependencies_parsed_at":"2022-09-01T04:40:43.124Z","dependency_job_id":null,"html_url":"https://github.com/jeffreymorganio/tweet-utils-js","commit_stats":null,"previous_names":["usabilityetc/tweet-utils-js"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/jeffreymorganio/tweet-utils-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffreymorganio%2Ftweet-utils-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffreymorganio%2Ftweet-utils-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffreymorganio%2Ftweet-utils-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffreymorganio%2Ftweet-utils-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeffreymorganio","download_url":"https://codeload.github.com/jeffreymorganio/tweet-utils-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffreymorganio%2Ftweet-utils-js/sbom","scorecard":{"id":514330,"data":{"date":"2025-08-11","repo":{"name":"github.com/jeffreymorganio/tweet-utils-js","commit":"6e8e0498d493becfeaa24c07d984dd355b8739fe"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/25 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-20T01:24:07.084Z","repository_id":35904479,"created_at":"2025-08-20T01:24:07.084Z","updated_at":"2025-08-20T01:24:07.084Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32802607,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","nodejs","twitter"],"created_at":"2024-12-29T09:39:54.102Z","updated_at":"2026-05-09T00:12:45.622Z","avatar_url":"https://github.com/jeffreymorganio.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tweet-utils-js\n\n**tweet-utils-js** is a JavaScript library of functions for working with tweets in JSON format returned by the [Twitter API](https://dev.twitter.com/rest/public).\n\n## Installation\n\n```\nnpm install tweet-utils-js\n```\n\n## Use\n\n```javascript\nvar TweetUtils = require('tweet-utils-js');\n\nvar aTweet = ...; // A JSON-format object retrieved from the Twitter API\n\n// Geocoding\nvar geoCoding = TweetUtils.extractGeocoding(aTweet);\n\n// User Mentions\nvar userMentions = TweetUtils.extractUserMentions(aTweet);\n\n// Hashtags\nvar hashtags = TweetUtils.extractHashtags(aTweet);\n\n// URLs\nvar urls = TweetUtils.extractURLs(aTweet);\n\n// Retweets\nif (TweetUtils.isRetweet(aTweet)) {\n  // do something with the retweet\n}\n```\n\n## API\n\n**extractGeocoding**(*tweet*)\n\nReturns the geocoded location in a tweet as an object with `latitude` and `longitude` keys, or `null` if the tweet is `null` or does not contain a geocoded location. This function returns an object with keys that explicitly label the latitude and longitude values to avoid the confusing and error-prone use of two-element arrays. Example output:\n\n```javascript\n{\n  longitude: 51.500152,\n  latitude: -0.126236\n}\n```\n\n**extractUserMentions**(*tweet*)\n\nReturns an array of the Twitter-user screen names mentioned in a tweet (without the @ prefix). The array will be empty if the tweet is `null` or does not mention any Twitter users. For example, the output for the tweet:\n\n\u003e @BBCNews and @CNN are reporting the story live.\n\nwould be:\n\n```javascript\n['BBCNews', 'CNN']\n```\n\n**extractHashtags**(*tweet*)\n\nReturns an array of the hashtags used in the text of a tweet (without the # prefix). The array will be empty if the tweet is null or does not contain any hashtags. For example, the output for the tweet:\n\n\u003e It's great to #opensource your #nodejs code!\n\nwould be:\n\n```javascript\n['opensource', 'nodejs']\n```\n\n**extractURLs**(*tweet*)\n\nReturns an array of the URLs used in the text of a tweet. The array will be empty if the tweet is null or does not contain any URLs. For example, the output for the tweet:\n\n\u003e Learn about NodeJS and npm at https://nodejs.org/ and https://www.npmjs.com/\n\nwould be:\n\n```javascript\n['https://nodejs.org/', 'https://www.npmjs.com/']\n```\n\nThe `extractURLs` function returns the full-length, expanded form of the URL when it is available; otherwise the default form is returned, which will often be a [shortened URL](https://en.wikipedia.org/wiki/URL_shortening).\n\n**isRetweet**(*tweet*)\n\nReturns `true` if the tweet is a retweet. A tweet is retweeted when users press the retweet button of a Twitter user interface or when they prefix the tweet text with \"RT\" or \"RT:\". For example, the output for the following tweets would be `true`:\n\n\u003e RT @BBCNews and @CNN are reporting the story live.\n\n\u003e RT: @BBCNews and @CNN are reporting the story live.\n\nIn constrast, the output for the following tweet would be `false`:\n\n\u003e @BBCNews and @CNN are reporting the story live.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffreymorganio%2Ftweet-utils-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeffreymorganio%2Ftweet-utils-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffreymorganio%2Ftweet-utils-js/lists"}