Skip to content

Commit

Permalink
Merge pull request #101 from yansenlei/master
Browse files Browse the repository at this point in the history
Fixed: Nodejs API updates information about Buffer
  • Loading branch information
qrohlf committed Jan 12, 2019
2 parents b2b3e89 + dd0a6f9 commit d836830
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/save-as-png.js
Expand Up @@ -22,7 +22,7 @@ var pngURI = Trianglify({
var data = pngURI.substr(pngURI.indexOf('base64') + 7);

// Decode the base64 encoded blob into a buffer
var buffer = new Buffer(data, 'base64');
var buffer = new Buffer.from(data, 'base64');

// Save the buffer to a file
fs.writeFileSync(process.argv[2], buffer);

0 comments on commit d836830

Please sign in to comment.