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.
number-converter
Advanced tools
A Node.js library for converting between different numeric representations.
var NumberConverter = require("number-converter").NumberConverter;
var nc = new NumberConverter(NumberConverter.DECIMAL, NumberConverter.ROMAN_NUMERAL);
console.log(nc.convert(1234)); // MCCXXXIV
console.log(nc.deconvert("MCMXCIX")); // 1999
A NumberConverter can convert between different numeric representations specified in its constructor. To convert between hexadecimal and binary, write:
var nc = new NumberConverter(NumberConverter.HEXADECIMAL, NumberConverter.BINARY);
console.log(nc.convert("F8F")); // "111110001111"
Here are the available number types:
NumberConverter.DECIMAL
- Base-10 number system (digits 0-9)NumberConverter.BINARY
- Base-2 number system (digits 0 and 1)NumberConverter.OCTAL
- Base-8 number system (digits 0-7)NumberConverter.HEXADECIMAL
- Base-16 number system (digits 0-9 and letters A-F)NumberConverter.ROMAN_NUMERAL
- Numeric system used in ancient Rome (letters I, V, X, L, C, D and M)NumberConverter.SCIENTIFIC_NOTATION
- Scientific notation: a way of writing numbers too large or small to be conveniently written as decimal (e.g. 5200000 -> 5.2e6)To use number-converter in your Node.js project, run:
npm install number-converter --save
FAQs
Converts numbers between various formats
The npm package number-converter receives a total of 0 weekly downloads. As such, number-converter popularity was classified as not popular.
We found that number-converter 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.
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.