A readable/writable stream that manipulates SVG files. The primary use
case is removing elements whose
id attribute isn't on a
whitelist. This is useful as a preprocessor to
inkscape that only
supports a single
var SvgFilter =fs = ;fs;
SVG file itself by specifying the
can manipulate the SVG DOM however it wants through the
global. The script also has access to the globals
svgFilter. The latter is the options object passed to the
SvgFilter constructor, so it's possible to carry out specific
instructions, eg. change the color of an icon.
var SvgFilter =fs = ;;
This will produce an SVG file where the
stroke attribute of the
circle element has been changed to
can also specify the id of the script to run, or an array of ids.
3-clause BSD license -- see the
LICENSE file for details.