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

randomart

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

randomart

OpenSSH randomart images library in JS, now with CLI!

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
37
decreased by-60.64%
Maintainers
1
Weekly downloads
 
Created
Source

randomart-generator

Generate OpenSSH style "randomart" images based on any data.

This is a shameless, cli port of slapresta/randomart, which is itself a shameless, slightly modified port of calmh/randomart to JS.

Example


randomart = require('randomart');

console.log(randomart([
  0x9b, 0x4c, 0x7b, 0xce, 0x7a, 0xbd, 0x0a, 0x13,
  0x61, 0xfb, 0x17, 0xc2, 0x06, 0x12, 0x0c, 0xed
]));
    .+.
      o.
     .. +
      Eo =
        S + .
       o B . .
        B o..
         *...
        .o+...

Documentation

The function returned by require('randomart') optionally accepts two arguments: the first one, data, is expected to be an array of integers between 0 and 255, while the second one, options, has the following structure, in which all parent elements are optional:

{
  "bounds": {
    "width": 17,
    "height": 9,
  },
  "symbols": {
    "-2": "E",
    "-1": "S",
     "0": " ",
     "1": ".",
    [...]
    "13": "/",
    "14": "^"
  }
}

Credits

Thanks to @calmh for their hard work! May the opensource gods reward them with seventy-two non-terrible window managers.

Keywords

FAQs

Package last updated on 24 May 2016

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