# @blumqa/astronomy

> It's' a package to use dynamic q&a (questions and answers) of astronomy

Latest version **1.0.2** (published 2024-10-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @blumqa/astronomy
pnpm add @blumqa/astronomy
yarn add @blumqa/astronomy
bun add @blumqa/astronomy
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2024-10-27 |
| First published | 2024-02-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 149.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | andrewdotdev |
| Maintainers | andrewdotdev |
| Keywords | q&a, questions, answers, quiz, astronomy, trivia |

## Links

- npm: https://www.npmjs.com/package/@blumqa/astronomy
- Repository: https://github.com/andrewdotdev/blumqa-astronomy
- Homepage: https://github.com/andrewdotdev/blumqa-astronomy#readme
- Issues: https://github.com/andrewdotdev/blumqa-astronomy/issues
- npm.io page: https://npm.io/package/@blumqa/astronomy

## Recent versions

- 1.0.2 (latest) — 2024-10-27
- 1.0.1 — 2024-10-26
- 1.0.0 — 2024-02-22

## README

# @blumqa/astronomy

## What is it?

It's' a package to use dynamic q&a (questions and answers) of astronomy

## How to install

```bash
pnpm install @blumqa/astronomy
```
<span style="color:rgba(128,128,128,0.5)">You can use any package manager you want, as long as <code>blumqa</code> is added.</span>

## How to use

```ts
/**
 * @param lang Options are 'en' and 'es'
 * @param id The id of the q&a
*/
getRandom(lang: string) // Output: {id: number, question: string, answer: string, options: string[]}
getById(lang: string, id: number) // Output: {id: number, question: string, answer: string, options: string[]}
```
## Example
```ts
import { getRandom, getById } from '@blumqa/astronomy'

console.log(getRandom('en')) // Output: {id: number, question: string, answer: string, options: string[]}
console.log(getById('es', 5)) // Output: {id: 5, question: "¿Quién fue el primer cosmonauta en viajar al espacio?", answer: "Yuri Gagarin", options: ["Neil Armstrong", "Buzz Aldrin", "Yuri Gagarin", "Alan Shepard"]}
```

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