SaMathGen
SaMathGen is NPM library that generates mathematical expressions for educational purposes.
Report Bug
.
Request Feature
Table Of Contents
About The Project
Generating various mathematical expressions with answer options independently, for example, for primary school teachers — is a routine job.
This library will help automate this process; it is enough to write the required arguments like expression's length, optionally brackets and other cool features.
Built With
Getting Started
So, you need to install Node.JS and generate Node.JS project in order to use SaMathGen library
Prerequisites
There are several ways of installing NodeJS:
- NVM - one of the easiest way
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
# restart terminal (https://github.com/nvm-sh/nvm#troubleshooting-on-linux)
nvm install --lts
- via NodeSource Node.js Binary Distributions by a package manager
- Downloading
tar.xz
from official website
Installation
- Create new Node.JS project
# works only in macOS & Linux, for Windows just create new folder and open it in cmd
mkdir new_project && cd new_project
- After Installing Node.JS, initialize your Node.JS project and install SaMathGen
npm init -y && npm i samathgen
- That's it! :D
Usage
- Create index.js(or .ts) and type this example:
const { mathGen } = require("samathgen");
console.log(mathGen(3, {
"answer": 40,
"brackets": false,
"quizOptions": true
}));
- Type
node index.js
(or .ts) in console and that's it!🥳
> node index.js
{
task: [ 100, '/', 5, '+', 20 ],
answer: 40,
quizOptions: [ 41, 40, 38, 30 ]
}
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- If you have suggestions for adding or removing projects, feel free to open an issue to discuss it, or directly create a pull request after you edit the README.md file with necessary changes.
- Please make sure you check your spelling and grammar.
- Create individual PR for each suggestion.
Creating A Pull Request
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE for more information.
Author
-
Azer Sadykhzadeh - CyberSecurity student in BHOS -
🐙 Sadykhzadeh