vsvg ( virtual SVG )
vsvg is a small lib that allow you to create svg's server side or client side. Its still in early devlopment so expect bug and file issues.
Install
$ npm install vsvg
You can also use it with your Browserify bundles.
Usage
vsvg exports an singleton with methods that corresponds to svg tags.
var vsvg = svg = vsvg style = vsvgstyle line = vsvg; styleinnerText = '.my-class{ stoke-width: 5px; }'; // set inner text style;conosle; // text/css svg; // append node to another nodesvg; // append node before another node console; /* <svg xmlns="http://www.w3.org/2000/svg" width="130" height="120" class="bar" ><style type="text/css" >.my-class{ stoke-width: 5px; }</style><line x1="0" y1="0" x2="100" y2="100" class="my-class" style="stroke:black;" ></line></svg> */ console; /* <style type="text/css" >.my-class{ stoke-width: 5px; }</style><line x1="0" y1="0" x2="100" y2="100" class="my-class" style="stroke:black;" ></line> */ svg; // alias of outerHTML