Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Convert numbers from a javascript base10 number to other bases. Can either run in "pure" mode (which runs into issues with mantissa and divisibility) or "accurate" mode which is certain to always keep the digits the same when going back to original base but does not give you the right numbers to use in mathematical operations.
Why the two modes? Often we are using this library to compress quite long numbers where we don't want to lose precision after the decimal. Accurate is much more useful, as we don't have to worry about loss of data when converting back to base 10.
Currently this only works in "accurate" mode for research sake.
Start by installing the package:
npm install baser
Then initialize the object and start using it.
var libBaser = require('baser');
var baser = libBaser.new();
var integerconversion = baser.convert(100200300);
console.log('Converting the integer 100200300 to a base 62 number: '+integerconversion);
var decimalconversion = baser.convert(1.100200300);
console.log('Converting 1.100200300 to a base 62 number: '+decimalconversion);
Which will output the following to the command-line:
Converting the integer 100200300 to a base 62 number: 6mQfs
Converting 1.100200300 to a base 62 number: 1.4CfL
FAQs
Free basing at its finest.
The npm package baser receives a total of 0 weekly downloads. As such, baser popularity was classified as not popular.
We found that baser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.