@esfiddle/blockify

    1.0.4 • Public • Published

    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!");
    })

    Install

    npm i @esfiddle/blockify

    Homepage

    esfiddle.net

    DownloadsWeekly Downloads

    0

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    29.1 kB

    Total Files

    5

    Last publish

    Collaborators

    • joshghent
    • preyneyv