diff --git a/canvas2svg.js b/canvas2svg.js index ff09f8a..038e6a8 100644 --- a/canvas2svg.js +++ b/canvas2svg.js @@ -1104,4 +1104,9 @@ //add options for alternative namespace window.C2S = ctx; + // CommonJS/Browserify + if (typeof module === "object" && typeof module.exports === "object") { + module.exports = ctx; + } + }());