{"id":42468743,"url":"https://github.com/krishcdbry/npm-text-parser","last_synced_at":"2026-01-28T09:45:04.839Z","repository":{"id":57142287,"uuid":"67829042","full_name":"krishcdbry/npm-text-parser","owner":"krishcdbry","description":"Text parser which receives text data as input and replaces the urls with clickable links (anchor tags), emails as clickable mail:to tags and also replaces hash tags (#tag) with empty clickable anchor tag","archived":false,"fork":false,"pushed_at":"2016-09-11T19:22:39.000Z","size":30,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-16T10:44:51.218Z","etag":null,"topics":[],"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/krishcdbry.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":"2016-09-09T20:05:15.000Z","updated_at":"2019-04-25T12:08:34.000Z","dependencies_parsed_at":"2022-09-05T10:01:28.592Z","dependency_job_id":null,"html_url":"https://github.com/krishcdbry/npm-text-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/krishcdbry/npm-text-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishcdbry%2Fnpm-text-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishcdbry%2Fnpm-text-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishcdbry%2Fnpm-text-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishcdbry%2Fnpm-text-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krishcdbry","download_url":"https://codeload.github.com/krishcdbry/npm-text-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishcdbry%2Fnpm-text-parser/sbom","scorecard":{"id":570002,"data":{"date":"2025-08-11","repo":{"name":"github.com/krishcdbry/npm-text-parser","commit":"f201d28e8eb84df6e955fa168ba60b5d70a6fc89"},"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":"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":"Code-Review","score":0,"reason":"Found 0/17 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":"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":"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":"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":"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":"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-20T16:04:56.515Z","repository_id":57142287,"created_at":"2025-08-20T16:04:56.515Z","updated_at":"2025-08-20T16:04:56.515Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28844008,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T07:39:25.367Z","status":"ssl_error","status_checked_at":"2026-01-28T07:39:24.487Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":[],"created_at":"2026-01-28T09:45:03.729Z","updated_at":"2026-01-28T09:45:04.831Z","avatar_url":"https://github.com/krishcdbry.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# npm-text-parser [![NPM version](https://img.shields.io/npm/v/npm-text-parser.svg)](https://www.npmjs.com/package/npm-text-parser)\nText parser which receives text data as input and replaces the urls with clickable links (anchor tags), emails as clickable mail:to tags and also replaces hash tags (#tag) empty clickable anchor tag.\n\n## Installation\n\n```bash\nnpm i npm-text-parser\n```\n\n## Usage\n```javascript\nvar parseText = require('npm-text-parser');\n```\n\n## parseUrl(text)\n\nReceives the input text and replaces all the url matches with clickable anchor links \n```javascript\n\n  var inputString = \"This is awesome it parses the url's dude and http://krishcdbry.com done !\"\n  \n  parseText.parseUrl(inputString);\n  // This is awesome it parses the url's dude and \u003ca href=\"http://krishcdbry.com\" \n  // target=\"_blank\"\u003ehttp://krishcdbry.com\u003c/a\u003e done !\n```\n\n## parseEmail(text)\n\nReceives the input text and replaces all the email matches with clickable mail:to anchor links  \n```javascript\n  \n  var inputString = \"This is awesome it parses the email's dude and krishcdbry@gmail.com done !\"\n  \n  parseText.parseEmail(inputString);\n  // This is awesome it parses the email's dude and  \n  // \u003ca href=\"mailto:krishcdbry@gmail.com\"\u003ekrishcdbry@gmail.com\u003c/a\u003e done !\n \n```\n\n## parseHash(text)\nReceives the input text and replaces all the hashtag matches with clickable empty anchor links\n```javascript\n  \n  var inputString = \"This is awesome it parses the hash tag's dude and #krishcdbry done !\"\n  \n  parseText.parseHashtags(inputString);\n   // This is awesome it parses the hash tag's dude and \u003ca href=\"javascript:;\"\u003e#krishcdbry\u003c/a\u003e done !\n \n```\n\n## parse(text)\n  Receives the input text and replaces the urls with clickable links (anchor tags),\n  emails as clickable mail:to tags and also replaces hash tags (#tag) with empty clickable anchor tags\n```javascript\n\n  var inputString = \"his is awesome it parses the url's , email's and hash tag's dude http://krishcdbry@gmail.com and email krishcdbry@gmail.com also #krishcdbry done !\"\n \n  parseText.parse(inputString)\n  // This is awesome it parses the url's , email's and hash tag's dude \n  // \u003ca href=\"http://krishcdbry@gmail.com\" target=\"_blank\"\u003ehttp://krishcdbry@gmail.com\u003c/a\u003e\n  // and email \u003ca href=\"mailto:krishcdbry@gmail.com\"\u003ekrishcdbry@gmail.com\u003c/a\u003e \n  // also \u003ca href=\"javascript:;\"\u003e#krishcdbry\u003c/a\u003e done !\n \n \n```\n\n## getUrls(text) \n (Array of url occurrences) - Receives the input text, reads all the Urls in it and returns  \n and array of all url occurrences \n```javascript\n\n  var inputString = 'This is awesome http://krishcdbry.com and www.heartynote.com done !'\n \n  textParser.getUrls(inputString)\n  // ['http://krishcdbry.com', 'www.heartynote.com']\n \n```\n\n\n## getEmails(text) \n  (Array of email occurrences) - Receives the input text, reads all the emails in it and returns  \n  and array of all email occurrences \n\n```javascript\n  var inputString = 'This is awesome krishcdbry@gmail.com and heartynote@gmail.com done !'\n \n  textParser.getEmails(inputString)\n  // ['krishcdbry@gmail.com', 'heartynote@gmail.com']\n```\n\t\t\t\n\t\t\t\n## getHashtags(text) \n (Array of hashtags occurrences) - Receives the input text, reads all the hashtagss in it and returns  \n and array of all hashtags occurrences \n\n```javascript\n  var inputString = 'This is awesome #krishcdbry, #heartynote and #node done !'\n \n  textParser.getHashtags(inputString)\n  // ['#krishcdbry', '#heartynote', '#node']\n```\n\n## getAll(text) \nAll occurrences includes (Urls, emails and hashtags)\n\n```javascript\n\n  var inputString = 'This is awesome krishcdbry@gmail.com and also http://nmpjs.org, www.krishcdbry.com and #heartynote and #node done !'\n \n  textParser.getAllOccurrences(inputString)\n  //\t{\n  //\t\tparsed_text: 'This is awesome \u003ca href=\"mailto:krishcdbry@gmail.com\"\u003ekrishcdbry@gmail.com\u003c/a\u003e and also \u003ca href=\"http://nmpjs.org\" target=\"_blank\"\u003ehttp://nmpjs.org\u003c/a\u003e, \u003ca href=\"www.krishcdbry.com\" target=\"_blank\"\u003ewww.krishcdbry.com\u003c/a\u003e and\u003ca href=\"javascript:;\" target=\"_blank\"\u003e #heartynote\u003c/a\u003e and\u003ca href=\"javascript:;\" target=\"_blank\"\u003e #node\u003c/a\u003e done !',\n  //\t\turls: [ 'http://nmpjs.org', 'www.krishcdbry.com' ],\n  //\t\temails: [ 'krishcdbry@gmail.com' ],\n  //\t\thashtags: [ ' #heartynote', ' #node' ]\n  //\t}\n \n```\n\n## Demo\nDemo @[npm-text-parser](https://tonicdev.com/npm/npm-text-parser)\n| https://tonicdev.com/npm/npm-text-parser\n\n## Author\nKrishcdbry [krishcdbry@gmail.com]\n\n## Licence\nMIT @[krishcdbry](krishcdbry.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrishcdbry%2Fnpm-text-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrishcdbry%2Fnpm-text-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrishcdbry%2Fnpm-text-parser/lists"}