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.
int is an arbitrary size integer library written in pure javascript. Why? Because I can and because you need it.
npm install int
var int = require('int');
var large = int('1234567890').mul('1234567890');
// did it work?
console.log(large.toString());
//'1524157875019052100' hell yea
// other cool stuff
var add_me = int('123456').add('-123456');
var power_up = int(2).pow(10);
Besides the int function, all of the other methods operate on the objects returned by int
construct a new aribtrary precision integer
valid values are native numbers, strings, or int objects. Anything after a decimal point will be discarded
add {value} to our number and return a new int
subtract {value} from our number and return a new int
multiply our int by {value} and return a new int
divide our int by {value} and return a new int (can truncate)
raise our int by {value} and return a new int
mod our int by {value} and return the new int
return a new int that is the negative
return a new int that is the absolute value
compare our value to {value}
return 0 if self and value are equal, -1 if self < value, 1 if self > value
return true if self < value
return true if self <= value
return true if self > value
return true if self >= value
return true if self == value
return true if self != value
FAQs
arbitrary precision integer and library in javascript
The npm package int receives a total of 1,398 weekly downloads. As such, int popularity was classified as popular.
We found that int 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.