
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.
@basic-math/divide
Advanced tools
Type-safe division operation with SafeNumber validation and zero-division protection
Type-safe division operation with SafeNumber validation and division-by-zero protection.
npm install @basic-math/divide @basic-math/core
import { divide } from '@basic-math/divide';
const result = divide(20, 4); // 5
const decimal = divide(10, 3); // 3.333...
const negative = divide(-15, 3); // -5
// Division by zero throws an error
try {
divide(10, 0); // Throws error
} catch (error) {
console.error('Cannot divide by zero');
}
divide(a: number, b: number): numberDivides the first number by the second with validation.
Parameters:
a - Dividend (number to be divided)b - Divisor (number to divide by)Returns: Quotient of a divided by b
Throws:
MIT
FAQs
Type-safe division operation with SafeNumber validation and zero-division protection
We found that @basic-math/divide demonstrated a healthy version release cadence and project activity because the last version was released less than 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.