{"id":19460537,"url":"https://github.com/bjarneo/among","last_synced_at":"2025-10-30T02:22:01.049Z","repository":{"id":57177401,"uuid":"91595131","full_name":"bjarneo/among","owner":"bjarneo","description":"Find the substring / element between the $start and $end argument.","archived":false,"fork":false,"pushed_at":"2017-05-17T16:06:33.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-08T02:22:37.971Z","etag":null,"topics":["regex","substring-search"],"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/bjarneo.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-05-17T16:01:01.000Z","updated_at":"2017-05-17T18:32:23.000Z","dependencies_parsed_at":"2022-09-04T11:10:22.486Z","dependency_job_id":null,"html_url":"https://github.com/bjarneo/among","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjarneo%2Famong","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjarneo%2Famong/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjarneo%2Famong/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjarneo%2Famong/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bjarneo","download_url":"https://codeload.github.com/bjarneo/among/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240665186,"owners_count":19837693,"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":["regex","substring-search"],"created_at":"2024-11-10T17:37:28.803Z","updated_at":"2025-10-30T02:21:56.029Z","avatar_url":"https://github.com/bjarneo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"among\n--\n![Travis](https://travis-ci.org/bjarneo/among.svg?branch=master)\n\nFind the substring / element between the $start and $end argument.\n\nDevelopers often need to find a string between two elements. This package will simplify that task by abstract away the regex part.\n\nUsage\n--\n\n```bash\n$ npm i --save among\n```\n\n```js\nconst among = require('among');\n\nconst str = 'The [quick] [brown] {{fox}} $jumps$ over the [lazy] {{dog}}';\n\nlet find = among('{{', '}}');\n\nconsole.log(find(str));\n\nfind = among('[', ']', true);\n\nconsole.log(find(str));\n\nconsole.log(among('$', '$')(str));\n```\nResult:  \n``` \n[ 'fox', 'dog' ]\n[ '[quick]', '[brown]', '[lazy]' ]\n[ 'jumps' ]\n```\n\nApi\n--\n```\nconst find = among(string $start, string $end [, boolean $preserved]);\n\nfind(string $str)\n```\n* $start is the first string to match\n* $end is the last string to match\n* $preserved is if the $start and $end strings should be preserved(optional)\n\n* $str the input string to search for elements\n\nTests\n--\n```bash\n$ npm test\n```\n\nContribution\n--\nContributions are appreciated.\n\nLicense\n--\nMIT-licensed. See LICENSE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjarneo%2Famong","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbjarneo%2Famong","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjarneo%2Famong/lists"}