Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bigjs-adapter

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bigjs-adapter - npm Package Compare versions

Comparing version 2.0.2 to 2.1.0

4

package.json
{
"name": "bigjs-adapter",
"version": "2.0.2",
"version": "2.1.0",
"description": "big.js adapter for linear-arbitrary-precision",

@@ -23,2 +23,3 @@ "main": "src/bigjs-adapter.js",

"devDependencies": {
"arbitrary-precision": "^1.0.0",
"gulp": "^3.8.11",

@@ -29,3 +30,2 @@ "gulp-coverage": "^0.3.34",

"gulp-mocha": "^2.0.0",
"linear-arbitrary-precision": "^3.0.0",
"rimraf": "^2.3.2",

@@ -32,0 +32,0 @@ "should": "^5.0.0"

@@ -16,2 +16,3 @@ /*jshint node:true */

div: div,
pow: pow,
toString: toString,

@@ -46,4 +47,8 @@ valueOf: toString,

function pow(x, y) {
return x.pow(Number(y));
}
function toString(x) {
return x.toString();
}

@@ -7,7 +7,8 @@ /*jshint node:true, mocha:true */

var decimalFactory = require('linear-arbitrary-precision');
var decimalFactory = require('arbitrary-precision');
var adapter = require('../src/bigjs-adapter');
var Decimal = decimalFactory(adapter);
describe('linear arbitrary precision with big.js', function() {
var Decimal = decimalFactory(adapter);

@@ -48,2 +49,10 @@ describe('precision', function() {

});
it('should have a pow method with support for ints only', function() {
new Decimal('2').pow(new Decimal('3')).valueOf().should.be.exactly('8');
(function() {
new Decimal('81').pow(new Decimal('0.5')).valueOf().should.be.exactly('9');
}).should.throw('!pow!');
});
});

@@ -50,0 +59,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