{"id":15663035,"url":"https://github.com/kikobeats/voll","last_synced_at":"2025-05-05T23:09:14.995Z","repository":{"id":44923366,"uuid":"63536421","full_name":"Kikobeats/voll","owner":"Kikobeats","description":"A boolean expressions evaluator.","archived":false,"fork":false,"pushed_at":"2023-11-15T09:11:21.000Z","size":104,"stargazers_count":18,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-05T23:09:10.268Z","etag":null,"topics":["expr"],"latest_commit_sha":null,"homepage":"http://Kikobeats.github.io/voll/","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/Kikobeats.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2016-07-17T14:37:30.000Z","updated_at":"2024-04-21T19:15:40.000Z","dependencies_parsed_at":"2022-09-19T17:50:38.355Z","dependency_job_id":null,"html_url":"https://github.com/Kikobeats/voll","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kikobeats%2Fvoll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kikobeats%2Fvoll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kikobeats%2Fvoll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kikobeats%2Fvoll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kikobeats","download_url":"https://codeload.github.com/Kikobeats/voll/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252590618,"owners_count":21772938,"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":["expr"],"created_at":"2024-10-03T13:35:17.972Z","updated_at":"2025-05-05T23:09:14.975Z","avatar_url":"https://github.com/Kikobeats.png","language":"JavaScript","funding_links":["https://paypal.me/kikobeats"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"/logo.png\" alt=\"voll\" width=\"200\"\u003e\n  \u003cbr\u003e\n  Boolean expressions evaluator.\n  \u003cbr\u003e\n  \u003cbr\u003e\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/tag/Kikobeats/voll.svg?style=flat-square\" alt=\"Last version\"\u003e \u003ca href=\"https://travis-ci.org/Kikobeats/voll\"\u003e\u003cimg src=\"http://img.shields.io/travis/Kikobeats/voll/master.svg?style=flat-square\" alt=\"Build Status\"\u003e\u003c/a\u003e \u003ca href=\"https://coveralls.io/github/Kikobeats/voll\"\u003e\u003cimg src=\"https://img.shields.io/coveralls/Kikobeats/voll.svg?style=flat-square\" alt=\"Coverage Status\"\u003e\u003c/a\u003e \u003ca href=\"https://paypal.me/kikobeats\"\u003e\u003cimg src=\"https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square\" alt=\"Donate\"\u003e\u003c/a\u003e\u003cbr\u003e\u003ca href=\"https://david-dm.org/Kikobeats/voll\"\u003e\u003cimg src=\"http://img.shields.io/david/Kikobeats/voll.svg?style=flat-square\" alt=\"Dependency status\"\u003e\u003c/a\u003e \u003ca href=\"https://david-dm.org/Kikobeats/voll#info=devDependencies\"\u003e\u003cimg src=\"http://img.shields.io/david/dev/Kikobeats/voll.svg?style=flat-square\" alt=\"Dev Dependencies Status\"\u003e\u003c/a\u003e \u003ca href=\"https://www.npmjs.org/package/voll\"\u003e\u003cimg src=\"http://img.shields.io/npm/dm/voll.svg?style=flat-square\" alt=\"NPM Status\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n**voll** is based mayority [bool](https://www.npmjs.com/package/bool) but improved in some aspects:\n\n- Exact word matching.\n- Insensitive comparison support.\n- Detect words based on unicode ranges.\n- Caching level for speed up AST evaluation.\n- Detect quotes words using scape quotes (`'` or `\"`) for exact matches.\n- Operators alias (example: `red+yellow` means the same than `red OR yellow`).\n\n## Install\n\n```bash\n$ npm install voll --save\n```\n\n## Usage\n\n```js\nvar voll = require('voll')\nvar test = voll('(red OR blue) AND (orange OR yellow)')\n\ntest('red') //=\u003e false\ntest('yellow') //=\u003e false\ntest('red yellow') //=\u003e true\n```\n\nYou can build complex expressions as you need. Use parentheses to specify the preference:\n\n```\n((red OR blue) AND NOT (orange OR yellow)) OR orange\n```\n\nIn other case the preference is `left` to `right`. Also it handles malformed expressions. For example:\n\n```\n((red OR blue) AND NOT (orange yellow)) OR orange\n```\n\nProduces the follow error:\n\n```\nSyntaxError: Parse error on line 1:\n...ue) AND NOT (orange yellow)) OR orange\n-----------------------^\n```\n\n## Operators\n\n| Operator | Alias       |\n|----------|-------------|\n| `AND`    |             |\n| `OR`     | `+`         |\n| `NOT`    | `-`         |\n\n## API\n\n### voll(expr, [options])\n\n#### expr\n\n*Required*\u003cbr\u003e\nType: `string`\n\nBoolean expression to be evaluated.\n\n#### options\n\nType: `object`\n\nProvide specific parser options\n\n##### insensitive\n\nType: `boolean`\u003cbr\u003e\nDefault: `false`\n\nEnable/Disable insensitive comparison.\n\n##### cache\n\nType: `boolean`\u003cbr\u003e\nDefault: `true`\n\nEnable/Disable caching.\n\n##### cacheOpts\n\nType: `object`\n\nProvide specific cache options. See [mem#options](https://github.com/sindresorhus/mem#options).\n\n## License\n\nIcon made by [Darius Dan](http://www.flaticon.com/free-icon/browser_173659) from [flaticon](http://www.flaticon.com/).\n\nMIT © [Kiko Beats](https://github.com/Kikobeats)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkikobeats%2Fvoll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkikobeats%2Fvoll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkikobeats%2Fvoll/lists"}