{"id":17673618,"url":"https://github.com/codetheweb/substr-occurrence","last_synced_at":"2025-03-30T16:15:02.750Z","repository":{"id":57374016,"uuid":"129919782","full_name":"codetheweb/substr-occurrence","owner":"codetheweb","description":"A small library that counts the number of occurrences of a substring","archived":false,"fork":false,"pushed_at":"2018-08-13T16:10:51.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T14:19:56.115Z","etag":null,"topics":["count","small","string"],"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/codetheweb.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":"2018-04-17T14:47:11.000Z","updated_at":"2019-12-31T15:55:36.000Z","dependencies_parsed_at":"2022-09-17T17:10:09.764Z","dependency_job_id":null,"html_url":"https://github.com/codetheweb/substr-occurrence","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/codetheweb%2Fsubstr-occurrence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codetheweb%2Fsubstr-occurrence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codetheweb%2Fsubstr-occurrence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codetheweb%2Fsubstr-occurrence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codetheweb","download_url":"https://codeload.github.com/codetheweb/substr-occurrence/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246342994,"owners_count":20761947,"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":["count","small","string"],"created_at":"2024-10-24T05:42:38.840Z","updated_at":"2025-03-30T16:15:02.723Z","avatar_url":"https://github.com/codetheweb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Substr Occurrence\n[![forthebadge](https://forthebadge.com/images/badges/made-with-javascript.svg)](https://forthebadge.com) [![Build Status](https://travis-ci.org/codetheweb/substr-occurrence.svg?branch=master)](https://travis-ci.org/codetheweb/substr-occurrence)\n\nA small, extremely lightweight library that counts the number of occurrences of a substring or single character in a larger string.\nCreated because [string-occurrence](https://github.com/SamVerschueren/string-occurrence) was too bloated and slow.\n\n## Installation\n\n\n  `npm install codetheweb/substr-occurrence`\n\n## Usage\n\n```javascript\nvar occurrence = require('substr-occurrence');\n\nconsole.log(occurrence('o', 'foo bar');\n```\n\n  Output should be `2`.\n\n## Tests\n\n  `npm test`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodetheweb%2Fsubstr-occurrence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodetheweb%2Fsubstr-occurrence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodetheweb%2Fsubstr-occurrence/lists"}