Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
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');
});
});
You can view the changelog here
beJS is open-sourced software licensed under the MIT license
[1.11.0] - 2017-08-07
callback
to be.err
, now is Mocha readybe.of
alias of be.classOf
FAQs
Simple, light-weight assertions framework for javascript
The npm package bejs receives a total of 7,013 weekly downloads. As such, bejs popularity was classified as 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.