samathgen

0.1.3 • Public • Published

SaMathGen

SaMathGen is NPM library that generates mathematical expressions for educational purposes.

Report Bug . Request Feature

Downloads Contributors Forks Stargazers Issues License

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

Installation

  1. 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
  1. After Installing Node.JS, initialize your Node.JS project and install SaMathGen
npm init -y && npm i samathgen
  1. That's it! :D

Usage

  1. Create index.js(or .ts) and type this example:
const { mathGen } = require("samathgen");
console.log(mathGen(3, {
  "answer": 40,
  "brackets": false,
  "quizOptions": true
}));
  1. 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

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Author

Acknowledgements

Readme

Keywords

Package Sidebar

Install

npm i samathgen

Weekly Downloads

0

Version

0.1.3

License

GPL-v3.0

Unpacked Size

51.8 kB

Total Files

20

Last publish

Collaborators

  • sadykhzadeh