0.8.0 • Published 3 years ago

hfid v0.8.0

Weekly downloads
16
License
ISC
Repository
github
Last release
3 years ago

Overview

Overview

A library for generating IDs that are shared verbally or via printed media.

Use cases

  • Order IDs on documents that are printed, e.g. in transportation
  • Onine game IDs that are shared via text or verbally in a group, e.g. Among Us game codes
  • One-time invite codes

Features

  • Does not use ambiguous symbols
  • Auto-correct common mistakes (mistype or misheard)

For ID being printed and read

Does not use characters that can be misread as numbers Letter | Number --- | --- T|7 O|0 B|8 I|1

For ID being shared verbally

Does not use Q or W, since they are easy to be misheard

Error-correction

Fix function will replace not used chars with their probable origins Char | Replaced with --- | --- T|7 O|0 B|8 I|1 Q|0

Usage

const hfid = require('hfid');

// Generate a random ID
var id = hfid.random(6);

// Fixing user input
var fixedId = hfid.fix('ARTBI'); // returns 'AR781'
0.8.0

3 years ago

0.7.0

3 years ago

0.6.0

3 years ago

0.5.0

3 years ago

0.3.0

3 years ago

0.4.0

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago