{"id":19500597,"url":"https://github.com/naturalintelligence/bexp","last_synced_at":"2026-05-17T04:36:04.394Z","repository":{"id":66140677,"uuid":"275292237","full_name":"NaturalIntelligence/bexp","owner":"NaturalIntelligence","description":"Boolean infix Expression/Notation Parser","archived":false,"fork":false,"pushed_at":"2021-12-23T11:58:17.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-01T11:46:33.288Z","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/NaturalIntelligence.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-06-27T03:27:46.000Z","updated_at":"2021-12-23T11:58:20.000Z","dependencies_parsed_at":"2023-04-14T09:46:29.769Z","dependency_job_id":null,"html_url":"https://github.com/NaturalIntelligence/bexp","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/NaturalIntelligence%2Fbexp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NaturalIntelligence%2Fbexp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NaturalIntelligence%2Fbexp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NaturalIntelligence%2Fbexp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NaturalIntelligence","download_url":"https://codeload.github.com/NaturalIntelligence/bexp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240748332,"owners_count":19851242,"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-10T22:09:06.271Z","updated_at":"2026-05-17T04:36:04.324Z","avatar_url":"https://github.com/NaturalIntelligence.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Boolean Expression Parser (bexp)\n\n\n\n```bash\n$ npm install bexp\n```\n\n```js\nconst BexpParser = require(\"bexp\");\nconst options = { allowMathOperators : true};\nconst bexpParser = new BexpParser(\"a and b or c but !d\", options);\nbexpParser.test(\"a\")\nbexpParser.test([\"a\",\"b\"])\n```\n\nSupported expressions example\n\n* a and b or c but !d\n* a And b Or c But !d\n* a AND b OR c BUT !d\n* a + b OR c -d\n* a + b || c -d\n* a - b\n* a \u0026\u0026 b || c !d\n* a \u0026\u0026 b || c !d\n\nNote: \n* when operand is not given before `not` then it is considered as AND\n* `but` is an alias of `and`.\n\n**Boolean Expressions**\n\n```js\nconst BexpParser = require(\"bexp\");\n\nconst bexpParser = new BexpParser();\nbexpParser.evaluate(\"True and false or true but !N\")\n```\n\nSupported expressions example\n\n* True and false or true but !N\n* True And false Or true But !N\n* True AND false OR true BUT not N\n* True + false OR true -N\n* True + false || true -N \n* Yes \u0026\u0026 false || true !N \n* Y \u0026\u0026 false || true !N \n\nNote: \n* when operand is not given before `not` then it is considered as AND\n* `but` is an alias of `and`.\n\n## Applications\n\nUse it to evaluate which functional test has to be run when tag expression is given\n\n* @focus\n* @All but not @Ignore\n\nOr to build advanced mongodb search queries\n\n* (nodejs or reactjs or angularjs )\n* !java\n* (sql or mongodb) and (java or nodejs)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaturalintelligence%2Fbexp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaturalintelligence%2Fbexp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaturalintelligence%2Fbexp/lists"}