{"id":18687297,"url":"https://github.com/junosuarez/like","last_synced_at":"2025-07-10T20:10:46.189Z","repository":{"id":7030442,"uuid":"8304560","full_name":"junosuarez/like","owner":"junosuarez","description":"node module: build a regex from user input for filtering data","archived":false,"fork":false,"pushed_at":"2014-07-18T16:03:32.000Z","size":138,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-07T13:16:05.017Z","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/junosuarez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-20T02:37:06.000Z","updated_at":"2023-02-09T12:00:14.000Z","dependencies_parsed_at":"2022-09-21T03:20:15.664Z","dependency_job_id":null,"html_url":"https://github.com/junosuarez/like","commit_stats":null,"previous_names":["jden/like"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/junosuarez/like","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Flike","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Flike/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Flike/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Flike/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/junosuarez","download_url":"https://codeload.github.com/junosuarez/like/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Flike/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264648247,"owners_count":23643660,"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-07T10:32:20.931Z","updated_at":"2025-07-10T20:10:46.139Z","avatar_url":"https://github.com/junosuarez.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# like\nbuild a regex from user input for filtering data\n\n## installation\n\n```console\n$ npm install like\n```\n\n## usage\n```js\nvar like = require('like')\n\nvar filter = like(searchField.value)\n\nvar matches = items.filter(function (x) {\n  return filter.test(x)\n})\n\n// or we could get a predicate function like so:\n\nvar matches = items.filter(like.fn(searchField.value))\n```\n\n**note** As of 0.3.0, matches are case-sensitive by default. Functions take an options parameter which takes a `ignoreCase` option. Example:\n\n```js\nlike('foo', {ignoreCase: true})\n```\n\n## api\n\nDescribed using [jsig](https://github.com/jden/jsig):\n\n`type Predicate : (Value) =\u003e Boolean`\n\n### `like : (String, options: Object?) =\u003e RegExp`\n\n### `like.startsWith : (String, options: Object?) =\u003e RegExp`\n\n### `like.endsWith : (String, options: Object?) =\u003e RegExp`\n\n### `like.fn : (String, options: Object?) =\u003e Predicate`\n\n### `like.startsWithFn : (String, options: Object?) =\u003e Predicate`\n\n### `like.endsWithFn : (String, options: Object?) =\u003e Predicate`\n\n## running the tests\n\n```console\n$ git clone git@github.com:AgileDiagnosis/like.git \u0026\u0026 cd like\n$ npm install\n$ npm test\n```\n\n## kudos to\nsubstack for [quotemeta](https://www.npmjs.org/package/quotemeta)\n\n## contributors\n\njden \u003cjason@denizac.org\u003e\n\n## license\nMIT. (c) 2013 Agile Diagnosis \u003chello@agilediagnosis.com\u003e. See LICENSE.md","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunosuarez%2Flike","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunosuarez%2Flike","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunosuarez%2Flike/lists"}