Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
babel-plugin-transform-jsbi-to-bigint
Advanced tools
Compile JSBI code that works in today’s environments to native BigInt code.
Input using JSBI:
import JSBI from 'jsbi';
const a = JSBI.BigInt(Number.MAX_SAFE_INTEGER);
const b = JSBI.BigInt('42');
JSBI.add(a, b);
JSBI.subtract(a, b);
JSBI.multiply(a, b);
JSBI.divide(a, b);
JSBI.remainder(a, b);
JSBI.exponentiate(a, b);
JSBI.leftShift(a, b);
JSBI.signedRightShift(a, b);
JSBI.bitwiseAnd(a, b);
JSBI.bitwiseOr(a, b);
JSBI.bitwiseXor(a, b);
JSBI.unaryMinus(a);
JSBI.bitwiseNot(a);
JSBI.equal(a, b);
JSBI.notEqual(a, b);
JSBI.lessThan(a, b);
JSBI.lessThanOrEqual(a, b);
JSBI.greaterThan(a, b);
JSBI.greaterThanOrEqual(a, b);
JSBI.EQ(a, b);
JSBI.NE(a, b);
JSBI.LT(a, b);
JSBI.LE(a, b);
JSBI.GT(a, b);
JSBI.GE(a, b);
a.toString();
JSBI.toNumber(a);
a instanceof JSBI;
JSBI.asIntN(64, JSBI.BigInt('42'));
JSBI.asUintN(64, JSBI.BigInt('42'));
Transpiled output using native BigInt
s:
const a = BigInt(Number.MAX_SAFE_INTEGER);
const b = 42n;
a + b;
a - b;
a * b;
a / b;
a % b;
a ** b;
a << b;
a >> b;
a & b;
a | b;
a ^ b;
-a;
~a;
a === b;
a !== b;
a < b;
a <= b;
a > b;
a >= b;
a == b;
a != b;
a < b;
a <= b;
a > b;
a >= b;
a.toString();
Number(a);
typeof a === 'bigint';
BigInt.asIntN(64, 42n);
BigInt.asUintN(64, 42n);
See the JSBI documentation for more information.
$ npm install babel-plugin-transform-jsbi-to-bigint
.babelrc
(recommended).babelrc
{
"plugins": ["transform-jsbi-to-bigint"]
}
$ babel --plugins transform-jsbi-to-bigint script.js
require('@babel/core').transform(code, {
'plugins': ['transform-jsbi-to-bigint']
});
On the main
branch, bump the version number in package.json
:
npm version patch -m 'Release v%s'
Instead of patch
, use minor
or major
as needed.
Note that this produces a Git commit + tag.
Push the release commit and tag:
git push
Our CI then automatically publishes the new release to npm.
FAQs
Compile JSBI code to native BigInt code.
The npm package babel-plugin-transform-jsbi-to-bigint receives a total of 1,346 weekly downloads. As such, babel-plugin-transform-jsbi-to-bigint popularity was classified as popular.
We found that babel-plugin-transform-jsbi-to-bigint demonstrated a not healthy version release cadence and project activity because the last version was released 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.