{"id":26665357,"url":"https://github.com/elsehow/templateer","last_synced_at":"2025-03-25T17:37:00.120Z","repository":{"id":57158012,"uuid":"56830630","full_name":"elsehow/templateer","owner":"elsehow","description":"match and extract from template strings","archived":false,"fork":false,"pushed_at":"2016-04-23T08:04:11.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-07-06T21:45:23.083Z","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":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elsehow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"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-04-22T06:10:25.000Z","updated_at":"2016-04-23T17:34:37.000Z","dependencies_parsed_at":"2022-08-28T13:20:12.320Z","dependency_job_id":null,"html_url":"https://github.com/elsehow/templateer","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/elsehow%2Ftemplateer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsehow%2Ftemplateer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsehow%2Ftemplateer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsehow%2Ftemplateer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elsehow","download_url":"https://codeload.github.com/elsehow/templateer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245511374,"owners_count":20627378,"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":"2025-03-25T17:36:59.357Z","updated_at":"2025-03-25T17:37:00.112Z","avatar_url":"https://github.com/elsehow.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# templateer\n\nextract text from strings that match templates or schema\n\nbased on [extractjs](https://www.npmjs.com/package/extractjs)\n\n## install\n\n```\nnpm install templateer\n```\n\n## use\n\n```javascript\nvar templateer = require('templateer')\nvar matcher = templateer(\"hello my {adj}, {noun}\")\nmatcher('hello fuzzy my friend')\n// \u003e false\nmatcher('hello my fuzzy, ')\n// \u003e false\nmatcher(\"hello my fuzzy, tree friends\")\n// { adj: 'fuzzy', noun: 'tree friends'}\n```\n\nif your template doesn't take arguments, this will still work for you.\nin this case, matcher will just return `{}` (which is truthy)\n\n```javascript\nvar matcher = templateer('/fall through the book')\nmatcher('/fall through the book')\n// {}\n```\n\n## api\n\n### var matcher = templateer('some cool {template}')\n\nmake a matcher for a template. \n\nsee [extractjs](https://www.npmjs.com/package/extractjs) for more on the template string format.\n\n### matcher('some cool string')\n\nif there is  match to the template, returns an object of template parameters associated to corresponding values in the string. (see example)\n\nreturns `false` if there is no match to the template\n\nif there is a match, but the template string takes no arguments, `matcher` will return `{}`\n\n## license\n\nBSD\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felsehow%2Ftemplateer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felsehow%2Ftemplateer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felsehow%2Ftemplateer/lists"}