Created
February 5, 2015 03:22
-
-
Save fraserxu/c5a65a19f5f10a9c518d to your computer and use it in GitHub Desktop.
svg pattern generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var btoa = require('btoa') | |
var fs = require('fs') | |
var pattern = fs.readFileSync('test.svg', { encoding: 'utf-8'}) | |
var b64 = btoa(pattern) | |
var b64 = "data:image/svg+xml;base64," + b64 | |
console.log(b64) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment