{"id":15657442,"url":"https://github.com/transitive-bullshit/parse-otp-message","last_synced_at":"2025-05-01T14:53:26.745Z","repository":{"id":32369444,"uuid":"132371925","full_name":"transitive-bullshit/parse-otp-message","owner":"transitive-bullshit","description":"Parses OTP messages for a verification code and service provider.","archived":false,"fork":false,"pushed_at":"2022-12-30T07:49:46.000Z","size":831,"stargazers_count":24,"open_issues_count":10,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-01T14:52:57.773Z","etag":null,"topics":["2-factor","activation","authentication","code","otp","pin","sms","verification"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/transitive-bullshit.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-06T20:05:41.000Z","updated_at":"2024-06-17T03:21:42.000Z","dependencies_parsed_at":"2023-01-14T21:15:15.202Z","dependency_job_id":null,"html_url":"https://github.com/transitive-bullshit/parse-otp-message","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transitive-bullshit%2Fparse-otp-message","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transitive-bullshit%2Fparse-otp-message/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transitive-bullshit%2Fparse-otp-message/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transitive-bullshit%2Fparse-otp-message/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/transitive-bullshit","download_url":"https://codeload.github.com/transitive-bullshit/parse-otp-message/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251895425,"owners_count":21661342,"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":["2-factor","activation","authentication","code","otp","pin","sms","verification"],"created_at":"2024-10-03T13:07:06.095Z","updated_at":"2025-05-01T14:53:26.713Z","avatar_url":"https://github.com/transitive-bullshit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# parse-otp-message\n\n\u003e Parses OTP messages for a verification code and service provider.\n\n[![NPM](https://img.shields.io/npm/v/parse-otp-message.svg)](https://www.npmjs.com/package/parse-otp-message) [![Build Status](https://travis-ci.com/transitive-bullshit/parse-otp-message.svg?branch=master)](https://travis-ci.com/transitive-bullshit/parse-otp-message) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n- handles hundreds of known services (wechat, google, facebook, whatsapp, uber, twitter, etc...)\n- thorough test suite\n- meant for parsing automated sms messages\n\n\n## Install\n\n```bash\nnpm install --save parse-otp-message\n```\n\n\n## Usage\n\n```js\nconst parse = require('parse-otp-message')\n\nconst result = parse('Use 5677 as Microsoft account security code')\n\n// result.code = '5677\n// result.service = 'microsoft'\n```\n\nSee the [test suite](https://github.com/transitive-bullshit/parse-otp-message/tree/master/test/index.js) for more examples of the types of messages this module can parse.\n\n\n## API\n\n### parse(message)\n\nReturns: `Object`\n\nParses the given message and returns an object containing two fields, `code` and `service`. The auth `code` will be all digits except in some special cases, and the returned `service` will always be lowercase.\n\nIf no code or service is found, `undefined` is returned.\n\n#### message\n\nType: `String`\n**Required**\n\nSMS or email message possibly containing an auth code and/or service provider details.\n\n\n## License\n\nMIT © [Travis Fischer](https://github.com/transitive-bullshit)\n\nSupport my OSS work by \u003ca href=\"https://twitter.com/transitive_bs\"\u003efollowing me on twitter \u003cimg src=\"https://storage.googleapis.com/saasify-assets/twitter-logo.svg\" alt=\"twitter\" height=\"24px\" align=\"center\"\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftransitive-bullshit%2Fparse-otp-message","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftransitive-bullshit%2Fparse-otp-message","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftransitive-bullshit%2Fparse-otp-message/lists"}