Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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
  • npm
  • Socket score

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

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

  • 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