# darkages

> A Dark Ages client for Node.js applications.

Latest version **1.0.4** (published 2018-12-19) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2018-12-19 |
| First published | 2018-12-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 33.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Eric Valadas |
| Maintainers | ericvaladas |

## Links

- npm: https://www.npmjs.com/package/darkages
- Repository: https://github.com/ericvaladas/da.js
- Homepage: https://github.com/ericvaladas/da.js#readme
- Issues: https://github.com/ericvaladas/da.js/issues
- npm.io page: https://npm.io/package/darkages

## Dependencies (1)

- [md5](https://npm.io/package/md5.md) ^2.2.1

## Recent versions

- 1.0.4 (latest) — 2018-12-19
- 1.0.3 — 2018-12-16
- 1.0.2 — 2018-12-16

## README

# darkages
A Dark Ages client for Node.js applications.

## Installation
```
npm install darkages
```

## Usage

### ES6
```js
import { Client } from 'darkages';

const client = new Client('username', 'password');
client.connect();
```


### CommonJS
```js
const Darkages = require('darkages');

const client = new Darkages.Client('username', 'password');
client.connect();
```

### Example
```js
const client = new Client('username', 'password');

client.events.on(0x0A, packet => {
  const channel = packet.readByte();
  const message = packet.readString16();
  const [ name, whisper ] = message.split('" ');

  if (whisper === 'ping') {
    const response = new Packet(0x19);
    response.writeString8(name);
    response.writeString8('pong');
    client.send(response);
  }
});

client.connect();
```

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