
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A library to convert numbers in full to actual numbers
Bhaskara is a small library that aims to convert written numbers in real integers for programming purposes, providing an easy interface for extending your own languages.
$ npm install --save-dev bhaskara
var bhaskara = require('bhaskara');
bhaskara('zero'); // 0
bhaskara('ten'); // 10
bhaskara('one hundred eighty-nine'); // 189
bhaskara('forty-two million and one'); // 42000001
bhaskara('twenty-two trillion ninety-two'); // 22000000000092
bhaskara('a duck'); // NaN, because a duck is not a number
If installed globally, you can use bhaskara as a command line utility, for instance:
$ bhaskara --locale en forty-two
$ 42
Available locales: en, pt.
The function takes three arguments with the format bhaskara(number, [locale, [mapper]]).
Type: string
The number in full to be converted.
Type: json or string
Default: 'en'
locale should be either a json object with the main translations for the language, for instance, "twenty": 20; or a string, representing a built-in language.
Type: function
Arguments: number : number
A function that takes a number as parameter and must return either an array of numbers or a number. This function aims to filter the numbers after being translated. This function must ensure that no number is a composition of a power of ten, i.e. every number must be in the range [0-9] or be a base 10^x.
If no mapper is given and there is no default mapper for the locale provided, then the identity function is used.
MIT
FAQs
A library to convert numbers in full to actual numbers
We found that bhaskara 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.