# qbasic

> API to run qb.js inside node

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

## Install

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

Provides the command `qbasic`.

## Health

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

Positive: has types; no vulnerabilities; high quality score.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2021-12-15 |
| First published | 2021-12-13 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 178 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | DevAndromeda |
| Maintainers | snowflake7 |
| Keywords | qbasic, compiler, api |

## Links

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

## Dependencies (1)

- [readline-sync](https://npm.io/package/readline-sync.md) ^1.4.10

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.1.4 (latest) — 2021-12-15
- 0.1.3 — 2021-12-14
- 0.1.2 — 2021-12-13
- 0.1.1 — 2021-12-13
- 0.1.0 — 2021-12-13

## README

# QBasic.js

QBasic.js allows you to use **[qb.js](https://github.com/smhanov/qb.js)** inside node projects.

# Example

## CLI

```sh
$ npx qbasic --source=filePath.bas
```

`index.js`
```js
const { compileFile } = require("qbasic");
const fs = require("fs");

const { bytecode } = compileFile("./demo.bas");
fs.writeFileSync("./bytecode.txt", bytecode);
```

`demo.bas`

```basic
CLS
PRINT "Hello from QBasic"
END
```

`bytecode.txt`

```txt
   ' L1 CLS
syscall CLS
   ' L2 PRINT "Hello from QBasic"
pushconst Hello from QBasic
syscall print
pushconst 

syscall print
   ' L3 END
end
ret
end
```

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