Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

distinguishable

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

distinguishable

Distinguishable random string generator

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
18
increased by350%
Maintainers
2
Weekly downloads
 
Created
Source

distinguishable

Create a string and parse a string to a standard set of characters

For order references it is important to not have any problems created by users mistyping information e.g. on a wiretransfer reference. Thus I looked at the characters of a european keyboard and tried to find all possible misinterpretations of letters either alone or as groups.

These are my findings of similiar looking characters:

o, O, Q, ö, Ö, 0
i, I, l, L, |, j, J, ı, 1
z, Z, 2
a, A, 4
s, S, 5
B, 8

g, q
q, 9
6, b
e, f
m, n
u, v


rn, m
vv, w

The final result should in my opinion only consist of Capital Letters and Numbers. Thus the list of letters to create a random string is the following:

CDEHKMPRSTUWXY012458

totaling 20 chars.

Installation

$ npm install distinguishable

Usage

var distinguishable = require('distinguishable');

Choose a different string length:

console.log(distinguishable.create(12));
// UXYYTHUMU8

Parse string:

console.log(distinguishable.parse("U4I1o00"));
// U411000

console.log(distinguishable.parse("UaILo0ö"));
// U411000

Running tests

vows test/test.js

TODO

See the issue tracker.

Author

Thomas Schaaf (schaaf@komola.de). Development was sponsored by komola.

Thanks

Big thanks go to SDA Software Associates Inc. who created passgen and greatly inspired the structure.

Keywords

FAQs

Package last updated on 07 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc