{"id":15698898,"url":"https://github.com/doowb/parse-mentions","last_synced_at":"2025-05-09T02:13:51.515Z","repository":{"id":57319391,"uuid":"69119449","full_name":"doowb/parse-mentions","owner":"doowb","description":"Parse and optionally replace @ mentions from a string of text.","archived":false,"fork":false,"pushed_at":"2017-06-30T05:47:06.000Z","size":20,"stargazers_count":6,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-09T02:13:46.210Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/doowb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/contributing.md","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-24T18:11:29.000Z","updated_at":"2021-04-12T21:56:10.000Z","dependencies_parsed_at":"2022-08-25T20:40:49.888Z","dependency_job_id":null,"html_url":"https://github.com/doowb/parse-mentions","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fparse-mentions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fparse-mentions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fparse-mentions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fparse-mentions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doowb","download_url":"https://codeload.github.com/doowb/parse-mentions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253176445,"owners_count":21866143,"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":[],"created_at":"2024-10-03T19:35:54.231Z","updated_at":"2025-05-09T02:13:51.497Z","avatar_url":"https://github.com/doowb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# parse-mentions [![NPM version](https://img.shields.io/npm/v/parse-mentions.svg?style=flat)](https://www.npmjs.com/package/parse-mentions) [![NPM monthly downloads](https://img.shields.io/npm/dm/parse-mentions.svg?style=flat)](https://npmjs.org/package/parse-mentions)  [![NPM total downloads](https://img.shields.io/npm/dt/parse-mentions.svg?style=flat)](https://npmjs.org/package/parse-mentions) [![Linux Build Status](https://img.shields.io/travis/doowb/parse-mentions.svg?style=flat\u0026label=Travis)](https://travis-ci.org/doowb/parse-mentions) [![Windows Build Status](https://img.shields.io/appveyor/ci/doowb/parse-mentions.svg?style=flat\u0026label=AppVeyor)](https://ci.appveyor.com/project/doowb/parse-mentions)\n\n\u003e Parse and optionally replace @ mentions from a string of text.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save parse-mentions\n```\n\nInstall with [yarn](https://yarnpkg.com):\n\n```sh\n$ yarn add parse-mentions\n```\n\n## Usage\n\n```js\nvar parse = require('parse-mentions');\n```\n\n## API\n\n### [.parse](index.js#L16)\n\nParses a string and returns an array of `@mention` objects.\n\n**Params**\n\n* `str` **{String}**: Input string to parse looking for @ mentions.\n* `fn` **{Function}**: Optional replace function. When passed in, the @ mentions are replaced in the string instead of returned as an array. The new string is returned.\n* `returns` **{String|Array}**: Array of mention objects, with `name` and `match` arguments.\n\n**Example**\n\n```js\nvar mentions = parseMentions('Foo @doowb bar @jonschlinkert');\n```\n\n## About\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\nPlease read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards.\n\n### Contributors\n\n| **Commits** | **Contributor** |  \n| --- | --- |  \n| 13 | [doowb](https://github.com/doowb) |  \n| 4  | [jonschlinkert](https://github.com/jonschlinkert) |  \n\n### Building docs\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n### Running tests\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n### Author\n\n**Brian Woodward**\n\n* [github/doowb](https://github.com/doowb)\n* [twitter/doowb](https://twitter.com/doowb)\n\n### License\n\nCopyright © 2017, [Brian Woodward](https://github.com/doowb).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 30, 2017._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoowb%2Fparse-mentions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoowb%2Fparse-mentions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoowb%2Fparse-mentions/lists"}