Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adityasharat/math-problem-generator-js
Generate simple math problems and test their results
https://github.com/adityasharat/math-problem-generator-js
education javascript-library learn library math
Last synced: 3 months ago
JSON representation
Generate simple math problems and test their results
- Host: GitHub
- URL: https://github.com/adityasharat/math-problem-generator-js
- Owner: adityasharat
- Created: 2018-09-20T20:04:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-16T19:10:33.000Z (over 6 years ago)
- Last Synced: 2024-11-13T01:26:49.161Z (3 months ago)
- Topics: education, javascript-library, learn, library, math
- Language: JavaScript
- Homepage:
- Size: 168 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Math Problem Generator
> Generate random math problems and test their results
[![NPM](https://img.shields.io/npm/v/math-problem-generator.svg)](https://www.npmjs.com/package/math-problem-generator) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
## Install
```bash
npm install --save math-problem-generator
```## Usage
```JavaScript
import MathProblems from 'math-problem-generator'const evaluator = MathProblems.getEvaluator();
evaluator.evaluate('2+2'); // 4const generator = MathProblems.getGenerator(1);
let problem = generator.next(); // {x: , y: , op: ''}
problem.evaluate(); // returns the result
```## License
Apache v2.0 © [adityasharat](https://github.com/adityasharat) 2018