- TypeScript 98.9%
- JavaScript 1.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| __tests__ | ||
| src | ||
| .gitignore | ||
| .npmignore | ||
| babel.config.js | ||
| jest.json | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
SaMathGen
NPM library that generates math expressions for education purposes.
You can report bug
or
request feature 👀
Table Of Contents
About The Library
Generating various math expressions independently, for example, for primary school educators — is a routine job.
This library can help you automate this process; it is enough to write the required arguments like expression's size, optionally brackets and other cool features.
There are no dependencies in this library, except 💙TypeScript.
With 💚 by Azer Sadykhzadeh — 🐙 GitHub
Getting Started
So, you need to install Node.JS and generate Node.JS project in order to use SaMathGen library.
Prerequisites
Prerequisites
There are several ways of installing Node.JS:- 💙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.xzfrom official website
Installation
- Create new Node.JS project
# works only in macOS & Linux
mkdir new_project && cd new_project
# for Windows just create new folder and open it in cmd
npm init -y
- Install SaMathGen
npm install samathgen
- That's it! ^_^
Usage
- Create index.js(or .ts) and type this example:
const { mathGen } = require("samathgen");
const expression = mathGen(3, {
"answer": 40,
"brackets": false,
"quizOptions": true
});
console.log(expression);
- Type
node index.js(or .ts) in console and check output! 🥳
> 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.
- Please make sure your pull request is not a duplicate of an existing issue.
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 GNU General Public License v3.0. See LICENSE for more information.