{"id":13671203,"url":"https://github.com/fabioricali/beJS","last_synced_at":"2025-04-27T14:33:09.297Z","repository":{"id":57189440,"uuid":"93997023","full_name":"fabioricali/beJS","owner":"fabioricali","description":"Simple, light-weight assertions framework for javascript","archived":false,"fork":false,"pushed_at":"2020-09-04T16:41:14.000Z","size":1546,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T02:39:16.484Z","etag":null,"topics":["assertion-library","assertions","framework","javascript","nodejs","test-framework","throw-errors","validation-library"],"latest_commit_sha":null,"homepage":"https://be.js.org","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabioricali.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-11T10:24:05.000Z","updated_at":"2021-10-12T05:28:54.000Z","dependencies_parsed_at":"2022-09-15T06:21:55.451Z","dependency_job_id":null,"html_url":"https://github.com/fabioricali/beJS","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabioricali%2FbeJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabioricali%2FbeJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabioricali%2FbeJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabioricali%2FbeJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabioricali","download_url":"https://codeload.github.com/fabioricali/beJS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251154347,"owners_count":21544481,"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":["assertion-library","assertions","framework","javascript","nodejs","test-framework","throw-errors","validation-library"],"created_at":"2024-08-02T09:01:02.663Z","updated_at":"2025-04-27T14:33:08.783Z","avatar_url":"https://github.com/fabioricali.png","language":"JavaScript","readme":"\u003cdiv align=\"center\"\u003e\n\u003cbr/\u003e\n\u003cimg width=\"102\" src=\"https://raw.githubusercontent.com/fabioricali/beJS/master/extra/logo.png\" title=\"beJS\"/\u003e\n\n***to be, or not to be, that is the question***\n\u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\n\u003ca href=\"https://travis-ci.org/fabioricali/beJS\" target=\"_blank\"\u003e\u003cimg src=\"https://travis-ci.org/fabioricali/beJS.svg?branch=master\" title=\"Build Status\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://coveralls.io/github/fabioricali/beJS?branch=master\" target=\"_blank\"\u003e\u003cimg src=\"https://coveralls.io/repos/github/fabioricali/beJS/badge.svg?branch=master\" title=\"Coverage Status\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://opensource.org/licenses/MIT\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" title=\"License: MIT\"/\u003e\u003c/a\u003e\n\u003cimg src=\"https://img.shields.io/badge/node.js-%3E%3D6-blue.svg\" title=\"Node.js version\"/\u003e\n\u003cimg src=\"https://img.shields.io/badge/team-terrons-orange.svg\" title=\"Team Terrons\"/\u003e\n# Simple, light-weight assertions framework for javascript\n\n#### More than ***190*** validation methods\n\n\u003c/div\u003e\n\n## Installation\n\n### Node.js\n```javascript\nnpm install bejs --save\n```\n\n### Browser\n\n#### Local\n```html\n\u003cscript src=\"node_modules/bejs/dist/be.min.js\"\u003e\u003c/script\u003e\n```\n\n#### CDN unpkg\n```html\n\u003cscript src=\"https://unpkg.com/bejs/dist/be.min.js\"\u003e\u003c/script\u003e\n```\n\n#### CDN jsDeliver\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/bejs/dist/be.min.js\"\u003e\u003c/script\u003e\n```\n\n## Example\n```javascript\nconst be = require('bejs');\n\n// call a method\nbe.boolean(true);\n\n// call interface \"not\"\nbe.not.boolean(1);\n\n// call interface \"all\" and passing arguments\nbe.all.boolean(true, false, true);\n\n// call interface \"all\" and passing array\nbe.all.boolean([true, false, true]);\n\n// call interface \"any\" and passing arguments\nbe.any.boolean(true, false, 1);\n\n// call interface \"err\" to throw an error if assertions  are not satisfied\nbe.err.equal('hello world', 'hello world!'); // throw AssertionError\n\n// call interface \"err\" passing a custom error message\nbe.err('the string must be equal to \"hello world!\"').equal('hello world', 'hello world!'); // throw AssertionError\n\n// call others interfaces from \"err\"\nbe.err.any.array([], {}, '');\n```\n\n## As unit test with Mocha\n```javascript\ndescribe('a test', () =\u003e {\n    it('should be ok', (done)=\u003e{\n        be.err(done).email('fabio@rica.li');\n    });\n    \n    it('should be false', ()=\u003e{\n        be.err.false(2 === 3);\n    });\n});\n```\n\n## Documentation\nSee \u003ca target=\"_blank\" href=\"https://be.js.org\"\u003ehttps://be.js.org\u003c/a\u003e\n\n## Changelog\nYou can view the changelog \u003ca target=\"_blank\" href=\"https://github.com/fabioricali/beJS/blob/master/CHANGELOG.md\"\u003ehere\u003c/a\u003e\n\n## License\nbeJS is open-sourced software licensed under the \u003ca target=\"_blank\" href=\"http://opensource.org/licenses/MIT\"\u003eMIT license\u003c/a\u003e\n\n## Author\n\u003ca target=\"_blank\" href=\"http://rica.li\"\u003eFabio Ricali\u003c/a\u003e\n\n\u003ca target=\"_blank\" href=\"https://www.mdslab.org\"\u003eDavide Polano\u003c/a\u003e","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabioricali%2FbeJS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabioricali%2FbeJS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabioricali%2FbeJS/lists"}