Skip to content

Instantly share code, notes, and snippets.

@alfredwesterveld
Last active July 9, 2018 14:08
Show Gist options
  • Save alfredwesterveld/a9b75e8cabb9c117b51bf4fc3084ca85 to your computer and use it in GitHub Desktop.
Save alfredwesterveld/a9b75e8cabb9c117b51bf4fc3084ca85 to your computer and use it in GitHub Desktop.
generate svg filesize
// 6MB => 6291456
const fs = require('fs');
fs.copyFileSync('svg.svg', 'long.svg');
fs.appendFileSync('long.svg', `<!--${'-'.repeat(6 * 1024 * 1024 - 96)}-->`);
Display the source blob
Display the rendered blob
Raw
<?xml version="1.0"?><svg width="240" height="240" xmlns="http://www.w3.org/2000/svg"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment