@shobhitpatkargj/subtraction-package
v1.0.0
Published
A simple subtraction utility package for NPM learning
Downloads
57
Maintainers
Readme
@shobhitpatkargj/subtraction-package
A simple subtraction utility package for Node.js applications.
Installation
npm install @shobhitpatkargj/subtraction-packageUsage
const subtract = require('@shobhitpatkargj/subtraction-package');
// Subtract two numbers
const result = subtract(10, 3);
console.log(result); // Output: 7
// Error handling
try {
subtract('10', 3); // Throws error: Both inputs must be numbers
} catch (error) {
console.error(error.message);
}Publishing to NPM
To publish this package to NPM:
# First, ensure you're logged in to npm
npm login
# Then publish with public access
npm publish --access publicNote: Replace @shobhitpatkargj with your actual npm username or organization name.
License
MIT
