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

drawille

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

drawille

Drawing in terminal with unicode braille characters

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
258
decreased by-7.86%
Maintainers
1
Weekly downloads
 
Created
Source

node-drawille

cube

Drawing in terminal with unicode braille characters. The idea is based on drawille by @asciimoo.

Install

$ npm install drawille

Usage

See examples.

This module provides a very basic API only, for fancy things, like drawing lines, use another module, like bresenham.

API

Canvas(w, h)

Create a new canvas with the given dimensions. w must be multiple of 2, h must be multiple of 4.

canvas.set(x, y)

Draw point on canvas at the given position.

canvas.unset(x, y)

Delete point on canvas at the given position.

canvas.toggle(x, y)

Toggle point on canvas at the given position.

canvas.clear()

Clear the whole canvas (delete every point).

canvas.frame()

Return the current content of canvas, as a newline-delimited string. It uses braille characters to represent points, so every line has length of w/2, and the string contains h/4 lines.

License

MIT

FAQs

Package last updated on 12 Jun 2014

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