# osu-lazer-db-reader

> Read and react to osu!lazer database

Latest version **0.1.6** (published 2022-05-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install osu-lazer-db-reader
pnpm add osu-lazer-db-reader
yarn add osu-lazer-db-reader
bun add osu-lazer-db-reader
```

## Health

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

Positive: has types; no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.6 |
| Published | 2022-05-26 |
| First published | 2022-05-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 50.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | yadpe |
| Maintainers | yadpe |
| Keywords | osu, lazer, database, reader |

## Links

- npm: https://www.npmjs.com/package/osu-lazer-db-reader
- npm.io page: https://npm.io/package/osu-lazer-db-reader

## Dependencies (1)

- [realm](https://npm.io/package/realm.md) ^10.17.0

## Recent versions

- 0.1.6 (latest) — 2022-05-26
- 0.1.5 — 2022-05-26
- 0.1.4 — 2022-05-26
- 0.1.3 — 2022-05-26
- 0.1.2 — 2022-05-26
- 0.1.1 — 2022-05-26
- 0.1.0 — 2022-05-26

## README

# Osu Lazer db reader

Read and react to changes in the new realm database of osu lazer.

⚠️ **This is a work in progress.**
Only beatmapset and beatmap are supported. Contributions are welcome!

## Installation

npm::
`npm install osu-lazer-db-reader`

yarn:
`yarn add osu-lazer-db-reader`

## Exemple

```ts
import { open, OsuDb } from "osu-lazer-db-reader";

const osuDb = await open("/path/to/osu-lazer-db.realm");

// Get all beatmapsets and beatmaps
const { beatmapsets, beatmaps } = osuDb;

// Add a listener to the beatmapset insertion
osuDb.addListener(
  OsuDb.Events.beatmapsetInserted,
  (_index, insertedBeatmapset) => {
    console.log(`New beatmapset: ${insertedBeatmapset.title}`);
    console.log(`New beatmapset: ${insertedBeatmapset.onlineId}`);
  }
);
```

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