# problemgenerator

> A arithmetic problem generator

Latest version **0.1.4** (published 2017-12-02) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install problemgenerator
pnpm add problemgenerator
yarn add problemgenerator
bun add problemgenerator
```

Provides the command `pgen`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2017-12-02 |
| First published | 2017-11-06 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sparetire |
| Maintainers | sparetire |
| Keywords | arithmetic, generator |

## Links

- npm: https://www.npmjs.com/package/problemgenerator
- Repository: https://github.com/sparetire/problemgenerator
- Homepage: https://github.com/sparetire/problemgenerator#readme
- Issues: https://github.com/sparetire/problemgenerator/issues
- npm.io page: https://npm.io/package/problemgenerator

## Dependencies (2)

- [chalk](https://npm.io/package/chalk.md) ^2.3.0
- [yargs](https://npm.io/package/yargs.md) ^10.0.3

## Recent versions

- 0.1.4 (latest) — 2017-12-02
- 0.1.3 — 2017-11-25
- 0.1.2 — 2017-11-09
- 0.1.1 — 2017-11-08
- 0.1.0 — 2017-11-06

## README

# problemgenerator

Save silly B kids

拯救智障儿童

## Install

```shell
$ npm i -g problemgenerator
```

## Usage

```shell
$ pgen [options] <arguments>
$ pgen -c path-of-configuration
```

## Available Options

* `-p` Number of problem (defaults to 30)
* `-o` Operator of problem (defaults to 'all', and '+', '-', '*', 'x', '/', '÷', 'pm', 'ms' are also available.)
* `-r` Range of operands (defaults to '1,100')
* `-n` Number of operands of each problem (defaults to '4,6')
* `-c` Path of configuration file
* `-h` Show help

## Configuration File

A `.js` or `.json` file

JSON:

```json
{
	"problemCount": 30,
	"operator": "all",
	"operandsRange": "1,100",
	"operandsCount": "3,8"
}
```

or JS:
```javascript
module.exports = {
	problemCount: 30,
	operator: 'all',
	operandsRange: '1,100',
	operandsCount: '3,8'
};
```

---
_Source: https://npm.io/package/problemgenerator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
