astromech
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

astromech.js

A library for connecting to your Galaxy's Edge Droid from Droid Depot.

Features

  • Cross-platform: works in the browser and NodeJS
  • Directional controls
  • Acceleration control
  • Sound controls

Usage

Add the library to your dependencies:

yarn add astromech

Import it and connect to a Droid:

import { Droid } from 'astromech'

const droid = await Droid.connect()

await droid.moveForward(3)

setTimeout(() => droid.stop(), 2000)

To find out all the things you can do with your droid, read the documentation at https://tubbo.github.io/astromech/classes/Droid.html

Since this library is written in TypeScript, we publish type definitions alongside the code in our NPM package releases.

Development

To run tests:

yarn test

To run lint checks:

yarn lint

To run type checks:

yarn types

To format code:

yarn fmt

You can also try out a basic example by running:

yarn start

Make sure your droid is turned on, and your remote is not!

Readme

Keywords

none

Package Sidebar

Install

npm i astromech

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

35.5 kB

Total Files

10

Last publish

Collaborators

  • tubbo