npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@alleyio/cheatbeads

v1.0.3

Published

Encoded communications for internally vibrating accessories while playing chess

Downloads

6

Readme

Cheatbeads

Cheatbeads is a framework for taking a string of text, transcoding it into a kind of binary expression, then relaying that to an emitter for handling.

One use case is to convert chess notation into morse code, then emit it wirelessly to some device smuggled onto a person, allowing them to silently receive the message (eg, through vibrations) without arousing suspicion.

It comes bundled with a Morse code transcoder and a simple console emitter, and knows standard chess notation. It will turn the UTF8 chess pieces into their ASCII equivalents by way of aliasing, allowing for better compatibility with most notation exports.

How to use

npm -i -D @alleyio/cheatbeads

It's ES6, so download, fork, or whatever, and then:

import Cheatbeads from './cheatbeads.js';

import Hoarse from './transcoders/hoarse.js';
import Console from './transcoders/console.js';

const stimulation = new Cheatbeads({
    transcoder: new Hoarse(),
    emitter: new Console(),
});

stimulation.parse('♔b6#').emit(); // king to b6, checkmate

More complex transcoders

Morse was chosen as a simple example of transcoding due to its binary state expression of . and -. If connected to a physical device, we can understand this as off or on, or perhaps a short & long vibration, respectively.

The result is still a very long series of Morse code characters, and then translated to something physical like a vibration, this becomes a time-expensive process. However, Morse could be adapted to work with 3 or more state expressions, giving more data density in a shorter amount of time.

Imagine 3 devices that accept a off or on state. If the devices were located such that the wearer could discern which device was vibrating, you could have a huge number of unique sequences. That seems impractical to memorize that many combinations, so to keep it simple, there's a demo transcoder called "Hoarse."

Hoarse

Hoarse is a structured way to communicate chess notation through three, independently vibrating devices. The goal is to be easily understood without learning too many combinations of vibrations. For the purposes of simplicity, we'll refer to the devices as A, B, C; with the vibration duration denoted by the familiar Morse, or . and -.

  • Piece names (and in one collision example, b or the bishop) are denoted by a . vibration from the B device. B.
  • Board rows (numbered) are denoted by a - vibration from the A device. A-
  • Board columns (lettered) are denoted by a . vibration from the A device A.
  • Capture is C-C-
  • Check is A.A-B.B-C.C-A.A-B.B-C.C-A.A-B.B-C.C-A.A-B.B-C.C-

This project contains a sample emitter for a three device setup, compatible with Hoarse.

In close

Transcoders can utilize the physical placement of physical devices to creat common patterns of vibrations that are both easier to recognize, and create unique sensations that aid in memory building.