New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

chai-bignumber

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chai-bignumber - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

.vscode/launch.json

14

chai-bignumber.js

@@ -6,2 +6,14 @@ module.exports = function(BigNumber){

return function (chai, utils) {
chai.Assertion.prototype.canary = true;
utils.addMethod(chai.Assertion.prototype, 'bne', function(expected, actual) {
this.assert(
false,
'expected #{expected} to be equal to #{actual}',
'expected #{expected} to not be equal to #{actual}',
expected.toString(),
actual.toString()
);
});
chai.Assertion.addProperty('bignumber', function() {

@@ -16,3 +28,3 @@ utils.flag(this, 'bignumber', true);

number = new BigNumber(value);
} else if (value instanceof BigNumber) {
} else if (value.isBigNumber || value instanceof BigNumber) {
number = value;

@@ -19,0 +31,0 @@ } else {

10

package.json
{
"name": "chai-bignumber",
"version": "2.0.0",
"version": "2.0.1",
"description": "Chai assertions for comparing arbitrary-precision decimals using the bignumber.js library",

@@ -11,6 +11,6 @@ "main": "chai-bignumber.js",

"devDependencies": {
"bignumber.js": "2.3.0",
"chai": "3.5.0",
"jshint": "2.9.2",
"mocha": "2.5.3"
"bignumber.js": "^4.0.2",
"chai": "^3.5.0",
"jshint": "^2.9.2",
"mocha": "^2.5.3"
},

@@ -17,0 +17,0 @@ "author": "António Marques <me@antoniomarques.eu>",

@@ -8,2 +8,5 @@ var BigNumber = require('bignumber.js');

var assert = chai.assert;
var expect = chai.expect;
describe('chai-bignumber', function() {

@@ -33,2 +36,3 @@ var matchInvalidError = /to be an instance of string, number or BigNumber/;

a.should.be.bignumber.equal(b);
expect(a).to.bignumber.equal(b);
}

@@ -35,0 +39,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc