Socket
Book a DemoInstallSign in
Socket

@esfiddle/blockify

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@esfiddle/blockify

Convert a code snippet to an image using ASCII blocks

1.0.4
latest
Source
npmnpm
Version published
Maintainers
2
Created
Source

Code Blocks!

Do npm i @esfiddle/blockify in your project! Then use it like this:

let blockify = require('@esfiddle/blockify');

let fs = require('fs'); // not needed for blockify, but needed for this demo


let code = `function test() {
	console.log('This is test code!');
}`

blockify(code).then(buffer => {
	// `buffer` is now an image buffer. You can save this wherever
	// you need to, or do whatever you need to do with it.
	// For now, let's save it as out.png
	fs.writeFileSync('out.png', buffer);
	console.log("YAY WE'RE DONE!");
})

Keywords

ascii

FAQs

Package last updated on 11 Jun 2018

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.