{"id":23698548,"url":"https://github.com/lmfresneda/mention-hashtag","last_synced_at":"2025-09-03T01:32:39.504Z","repository":{"id":57156086,"uuid":"98832425","full_name":"lmfresneda/mention-hashtag","owner":"lmfresneda","description":"Extract mentions (@mention) or hashtags (#hashtag) from any text","archived":false,"fork":false,"pushed_at":"2018-06-16T21:15:50.000Z","size":7,"stargazers_count":22,"open_issues_count":3,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-19T20:49:35.776Z","etag":null,"topics":["hashtag","javascript","mentions","regex","regexp","twitter"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/lmfresneda.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":"2017-07-31T00:15:35.000Z","updated_at":"2025-03-11T17:29:13.000Z","dependencies_parsed_at":"2022-08-28T18:34:34.864Z","dependency_job_id":null,"html_url":"https://github.com/lmfresneda/mention-hashtag","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/lmfresneda/mention-hashtag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmfresneda%2Fmention-hashtag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmfresneda%2Fmention-hashtag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmfresneda%2Fmention-hashtag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmfresneda%2Fmention-hashtag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lmfresneda","download_url":"https://codeload.github.com/lmfresneda/mention-hashtag/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmfresneda%2Fmention-hashtag/sbom","scorecard":{"id":596125,"data":{"date":"2025-08-11","repo":{"name":"github.com/lmfresneda/mention-hashtag","commit":"4a112d01cb68ccd35c2519968d953b1552b097a6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"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":"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":"Code-Review","score":1,"reason":"Found 1/9 approved changesets -- score normalized to 1","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":"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":"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":"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":"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T23:11:12.072Z","repository_id":57156086,"created_at":"2025-08-20T23:11:12.073Z","updated_at":"2025-08-20T23:11:12.073Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273377081,"owners_count":25094525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["hashtag","javascript","mentions","regex","regexp","twitter"],"created_at":"2024-12-30T07:17:34.393Z","updated_at":"2025-09-03T01:32:39.227Z","avatar_url":"https://github.com/lmfresneda.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mention-hashtag\n[![npm](https://img.shields.io/npm/v/mention-hashtag.svg?style=flat-square)](https://www.npmjs.com/package/mention-hashtag) [![npm](https://img.shields.io/npm/dw/mention-hashtag.svg?style=flat-square)](https://www.npmjs.com/package/mention-hashtag) ![Love](https://img.shields.io/badge/love-max-brightgreen.svg?style=flat-square) [![Travis](https://img.shields.io/travis/lmfresneda/mention-hashtag.svg?style=flat-square)](https://travis-ci.org/lmfresneda/mention-hashtag)\n\nExtract mentions (@mention) and/or hashtags (#hashtag) from any text\n\n## How to use\n\n```javascript\nconst extract = require('mention-hashtag')\n\nconst mentions = extract('Any text with @mention');\n// mentions == ['@mention']\n\nconst hashtags = extract('Any text with #hashtag', '#');\n// hashtags == ['#hashtag']\n\nconst all = extract('Any text with #hashtag and @mention and @othermention', 'all');\n// all == { mentions: ['@mention', '@othermention'], hashtags: ['#hashtag'] }\n```\n\nNOTE: The extract of mentions is by default. For extract hashtags, the '#' symbol in second parameter is required.\n\n## Options\n\n### Exclude repeated tokens\n\n```javascript\nconst mentions = extract('Any text with @mention and @mention and @othermention', { unique: true });\n// mentions == ['@mention', '@othermention']\n\nconst hashtags = extract('Any text with #hashtag and #hashtag and #otherhashtag', { unique: true, type: '#' });\n// hashtags == ['#hashtag', '#otherhashtag']\n\nconst all = extract('Any text with #hashtag and #hashtag and @mention and @mention', { unique: true, type: 'all' });\n// all == { mentions: ['@mention'], hashtags: ['#hashtag'] }\n```\n\nNOTE: The symbol '#' is communicated in 'type' property of second parameter\n\n### Remove '@' and '#' symbols\n\n```javascript\nconst mentions = extract('Any text with @mention and @othermention', { symbol: false });\n// mentions == ['mention', 'othermention']\n\nconst hashtags = extract('Any text with #hashtag and #otherhashtag', { symbol: false, type: '#' });\n// hashtags == ['hashtag', 'otherhashtag']\n\nconst all = extract('Any text with #hashtag and @mention', { symbol: false, type: 'all' });\n// all == { mentions: ['mention'], hashtags: ['hashtag'] }\n```\n\n## Mix\n\n### Unique, symbol and type properties are mixables\n\n```javascript\nconst mentions = extract('Any text with @mention and @mention and @othermention', { symbol: false, unique: true });\n// mentions == ['mention', 'othermention']\n\nconst hashtags = extract('Any text with #hashtag and #hashtag and #otherhashtag', { symbol: false, unique: true, type: '#' });\n// hashtags == ['hashtag', 'otherhashtag']\n\nconst all = extract('Any text with #hashtag and #hashtag and @mention and @mention', { symbol: false, unique: true, type: 'all' });\n// all == { mentions: ['mention'], hashtags: ['hashtag'] }\n```\n\n## Run test\n\n```\n$ npm install \u0026\u0026 npm test\n```\n\n## License\n\nMIT © [lmfresneda](https://github.com/lmfresneda)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmfresneda%2Fmention-hashtag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flmfresneda%2Fmention-hashtag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmfresneda%2Fmention-hashtag/lists"}