{"id":15390279,"url":"https://github.com/gajus/extract-email-address","last_synced_at":"2025-04-04T22:01:40.752Z","repository":{"id":46653774,"uuid":"261908747","full_name":"gajus/extract-email-address","owner":"gajus","description":"Extracts email address from an arbitrary text input.","archived":false,"fork":false,"pushed_at":"2025-01-30T17:28:45.000Z","size":36,"stargazers_count":62,"open_issues_count":0,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-28T21:01:35.527Z","etag":null,"topics":["email","extract","regex"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gajus.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-07T00:15:00.000Z","updated_at":"2025-01-31T08:06:29.000Z","dependencies_parsed_at":"2024-10-18T21:03:58.073Z","dependency_job_id":"9ee1b7bc-22e7-42b5-9997-1c44c2828534","html_url":"https://github.com/gajus/extract-email-address","commit_stats":{"total_commits":26,"total_committers":3,"mean_commits":8.666666666666666,"dds":"0.11538461538461542","last_synced_commit":"c9e343ba64743a0d0c6ff6601fc4dd178073919b"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gajus%2Fextract-email-address","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gajus%2Fextract-email-address/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gajus%2Fextract-email-address/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gajus%2Fextract-email-address/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gajus","download_url":"https://codeload.github.com/gajus/extract-email-address/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256093,"owners_count":20909240,"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","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":["email","extract","regex"],"created_at":"2024-10-01T15:05:13.030Z","updated_at":"2025-04-04T22:01:40.732Z","avatar_url":"https://github.com/gajus.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"extract-email-address\"\u003e\u003c/a\u003e\n# extract-email-address 📧\n\n[![Coveralls](https://img.shields.io/coveralls/gajus/extract-email-address.svg?style=flat-square)](https://coveralls.io/github/gajus/extract-email-address)\n[![NPM version](http://img.shields.io/npm/v/extract-email-address.svg?style=flat-square)](https://www.npmjs.org/package/extract-email-address)\n[![Canonical Code Style](https://img.shields.io/badge/code%20style-canonical-blue.svg?style=flat-square)](https://github.com/gajus/canonical)\n[![Twitter Follow](https://img.shields.io/twitter/follow/kuizinas.svg?style=social\u0026label=Follow)](https://twitter.com/kuizinas)\n\nExtracts email-like entities from an arbitrary text input.\n\n* [extract-email-address 📧](#extract-email-address)\n    * [API](#extract-email-address-api)\n    * [Usage](#extract-email-address-usage)\n    * [Filtering results](#extract-email-address-filtering-results)\n    * [Related projects](#extract-email-address-related-projects)\n\n\n\u003ca name=\"extract-email-address-api\"\u003e\u003c/a\u003e\n## API\n\n```js\nimport {\n  extractEmail,\n  type EmailMatch,\n} from 'extract-email-address';\n\nextractEmail(input: string): readonly EmailMatch[];\n```\n\n\u003ca name=\"extract-email-address-usage\"\u003e\u003c/a\u003e\n## Usage\n\n```js\nimport { extractEmail } from 'extract-email-address';\n\nextractEmail('extracts email from anywhere within the input gajus@gajus.com');\n// [{email: 'gajus@gajus.com'}]\n\nextractEmail('extracts multiple emails located anywhere within the input: foo@gajus.com, bar@gajus.com');\n// [{email: 'foo@gajus.com'}, {email: 'bar@gajus.com'}]\n\nextractEmail('extracts all sorts of obfuscated emails, e.g. f o o @ b a r . c o m or baz [at] qux [dot] com');\n// [{email: 'foo@bar.com'}, {email: 'baz@qux.com'}]\n\nextractEmail('extracts tagged emails, e.g. gajus+foo@gajus.com');\n// [{email: 'gajus+foo@gajus.com'}]\n\nextractEmail('extracts emails surrounded by odd unicode characters, e.g. 邮箱：gajus@gajus.com');\n// [{email: 'gajus@gajus.com'}]\n\nextractEmail('extracts emails surrounded by emojis, e.g. 📧gajus@gajus.com');\n// [{email: 'gajus@gajus.com'}]\n\nextractEmail('excludes invalid emails with invalid TLDs, e.g. gajus@gajus.png');\n// []\n\nextractEmail('ignores invalid emails foo@bar');\n// []\n\n```\n\n\u003ca name=\"extract-email-address-filtering-results\"\u003e\u003c/a\u003e\n## Filtering results\n\nSome matches might be syntactically valid email addresses, but not actual email addresses, e.g. `apple-touch-icon@2.png`.\n\n`extract-email-address` uses a list of valid top-level domains to filter out matches that are definitely not emails (such as `png` example), but you might still need to filter out domain specific false-positives.\n\n\u003ca name=\"extract-email-address-related-projects\"\u003e\u003c/a\u003e\n## Related projects\n\n* [`extract-date`](https://github.com/gajus/extract-date) – Extracts date from an arbitrary text input.\n* [`extract-price`](https://github.com/gajus/extract-price) – Extracts price from an arbitrary text input.\n* [`extract-time`](https://github.com/gajus/extract-time) – Extracts time from an arbitrary text input.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgajus%2Fextract-email-address","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgajus%2Fextract-email-address","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgajus%2Fextract-email-address/lists"}