Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@silvermine/chai-strictly-equal
Advanced tools
Chai assertion library plugin to add `strictlyEqual` function and disable `equal`
A plugin for the Chai Assertion Library that adds a .strictlyEqual
method, and disables the .equal
method.
Because the difference in .eql
(deep equality) and .equal
(strict equality) is way too
subtle. Chai provides .deep
modifier that modifies .equal
to be a deep equality check
(as if it were .eql
), further complicating the matter. It would be nice if there were a
.strictly
modifier so that you could do .to.strictly.eql(foo)
, but that doesn't exist,
and would be more difficult to add. So, for any Silvermine codebases where we are using
chai
, we will use this plugin and prohibit the use of .equal
, replacing it with
.strictlyEqual
to be more easily readable - especially for developers not familiar with
our codebase.
var chai = require('chai');
chai.use(require('@silvermine/chai-strictly-equal'));
That's all there is to it. Then your .equal
calls will throw an error, indicating that
you should replace them with .eql
or .strictlyEqual
.
We genuinely appreciate external contributions. See our extensive documentation on how to contribute.
This software is released under the MIT license. See the license file for more details.
FAQs
Chai assertion library plugin to add `strictlyEqual` function and disable `equal`
The npm package @silvermine/chai-strictly-equal receives a total of 366 weekly downloads. As such, @silvermine/chai-strictly-equal popularity was classified as not popular.
We found that @silvermine/chai-strictly-equal demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.