{"id":18865298,"url":"https://github.com/jonathanprince/grepit","last_synced_at":"2025-04-14T13:22:05.214Z","repository":{"id":22827092,"uuid":"26174134","full_name":"JonathanPrince/grepit","owner":"JonathanPrince","description":"Grep Module for Node","archived":false,"fork":false,"pushed_at":"2014-11-05T15:29:35.000Z","size":176,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-14T13:22:02.823Z","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/JonathanPrince.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":"2014-11-04T15:09:37.000Z","updated_at":"2018-08-08T15:38:31.000Z","dependencies_parsed_at":"2022-08-17T17:00:11.667Z","dependency_job_id":null,"html_url":"https://github.com/JonathanPrince/grepit","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/JonathanPrince%2Fgrepit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonathanPrince%2Fgrepit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonathanPrince%2Fgrepit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonathanPrince%2Fgrepit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JonathanPrince","download_url":"https://codeload.github.com/JonathanPrince/grepit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248886411,"owners_count":21177663,"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-11-08T04:46:35.379Z","updated_at":"2025-04-14T13:22:05.186Z","avatar_url":"https://github.com/JonathanPrince.png","language":"JavaScript","readme":"#grepit\n[![Build Status](https://travis-ci.org/JonathanPrince/grepit.svg)](https://travis-ci.org/JonathanPrince/grepit)\n\n[![NPM](https://nodei.co/npm/grepit.png?downloads=true\u0026stars=true)](https://nodei.co/npm/grepit/)\n\n##Description\n\nGrep Module for Node\n\n###Syntax\n\n`grep(pattern, file)`\n\n####Parameters\n\n**pattern**\n\nRegExp or String to be searched for. (aka. the 'needle')\n\n**file**\n\nString - path and filename of file to be searched. (aka. the 'haystack')\n\n####Output\n\nReturns an array. The elements of the array will be the lines in which the pattern appears.\n\n###Usage\n\nInstallation\n```\n$ npm install grepit\n```\n\ntest_file.txt:\n```txt\nThe first sentence of the text.\nNow the second sentence.\nWhy not a third, a third that has a comma in it.\nAnd then comes the fourth sentence.\n```\n\nExample\n```js\n\nvar grepit = require('grepit');\n\nvar result = grepit(/first/, 'test_file.txt');\n\n// result = [ 'The first sentence of the text.' ]\n\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanprince%2Fgrepit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanprince%2Fgrepit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanprince%2Fgrepit/lists"}