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

babel-plugin-transform-bigint

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-bigint - npm Package Compare versions

Comparing version 1.0.9 to 1.0.10

9

index.js

@@ -210,5 +210,2 @@ // see https://github.com/babel/babel/pull/6015

var maybeJSBI = {
BigInt: function BigInt(a) {
return JSBI.BigInt(a);
},
toNumber: function toNumber(a) {

@@ -291,2 +288,8 @@ return typeof a === "object" ? JSBI.toNumber(a) : Number(a);

}
if (path.node.callee.type === 'MemberExpression' &&
path.node.callee.object.type === 'Identifier' &&
path.node.callee.object.name === 'BigInt' &&
path.node.callee.property.name === 'asUintN') {
path.replaceWith(types.callExpression(types.memberExpression(types.identifier(JSBI), types.identifier('asUintN')), path.node.arguments));
}
},

@@ -293,0 +296,0 @@ BigIntLiteral: function (path, state) {

{
"name": "babel-plugin-transform-bigint",
"version": "1.0.9",
"version": "1.0.10",
"description": "A plugin for babel to transform `x * y` into something like `JSBI.multiply(x, y)` to support bigints.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,2 +0,2 @@

// to run the test use a command: `npx babel --plugins=./index.js tests.js`
// to run the test use a command: `npx babel --plugins=module:./index.js tests.js`

@@ -36,1 +36,23 @@ o.x.y += b;

*/
var g1 = 1;
g1 = 1n;
if (g1 === 1n) {
console.log(g1);
}
var g2 = 1n;
if (g2 == 1) {
console.log(g2);
}
var g3 = 1n;
if (g3 < 1) {
console.log(g3);
}
var g4 = 1n;
BigInt.asUintN(10, g4)
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