Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
to be, or not to be, that is the question
npm install bejs --save
<script src="node_modules/bejs/dist/be.min.js"></script>
<script src="https://unpkg.com/bejs/dist/be.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bejs/dist/be.min.js"></script>
const be = require('bejs');
// call a method
be.boolean(true);
// call interface "not"
be.not.boolean(1);
// call interface "all" and passing arguments
be.all.boolean(true, false, true);
// call interface "all" and passing array
be.all.boolean([true, false, true]);
// call interface "any" and passing arguments
be.any.boolean(true, false, 1);
// call interface "err" to throw an error if assertions are not satisfied
be.err.equal('hello world', 'hello world!'); // throw AssertionError
// call interface "err" passing a custom error message
be.err('the string must be equal to "hello world!"').equal('hello world', 'hello world!'); // throw AssertionError
// call others interfaces from "err"
be.err.any.array([], {}, '');
describe('a test', () => {
it('should be ok', (done)=>{
be.err(done).email('fabio@rica.li');
});
it('should be false', ()=>{
be.err.false(2 === 3);
});
});
You can view the changelog here
beJS is open-sourced software licensed under the MIT license
[2.0.1] - 2018-03-11
equal
FAQs
Simple, light-weight assertions framework for javascript
The npm package bejs receives a total of 58 weekly downloads. As such, bejs popularity was classified as not popular.
We found that bejs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.