@nahid6970/math-wizard-example
v1.0.0
Published
A simple math utility library for testing npm publishing.
Readme
Math Wizard Example
A simple math utility library created for testing npm project workflows, such as creation, testing, and publishing.
Installation
Once published, you can install this package using npm:
npm install math-wizard-exampleUsage
const math = require('math-wizard-example');
console.log(math.add(5, 3)); // 8
console.log(math.subtract(10, 4)); // 6
console.log(math.multiply(2, 6)); // 12
console.log(math.divide(10, 2)); // 5Running Tests
To run the included tests, use:
npm testHow to Publish to npm
- Create an npm account: If you don't have one, sign up at npmjs.com.
- Login via CLI: Run
npm loginand follow the prompts. - Verify
package.json: Ensure thenameis unique and theversionis correct. - Publish: Run
npm publish.- Note: If your package name is taken, you might need to change it in
package.jsonor use a scope like@your-username/math-wizard-exampleand publish withnpm publish --access public.
- Note: If your package name is taken, you might need to change it in
Updating your package
- Make your changes.
- Increment the version (e.g.,
npm version patch). - Run
npm publish.
License
MIT
