0.3.1 • Published 9 years ago

vsvg-parser v0.3.1

Weekly downloads
393
License
MIT
Repository
-
Last release
9 years ago

vsvg-parser ( virtual SVG parser ) Build Status

vsvg-parser is a small lib that allow you to parser svg's server side or client side. Its still in early devlopment so expect bug and file issues. Primarly used in vsvg.

Install

$ npm install vsvg-parser

You can also use it with your Browserify bundles.

Usage

var parser = require( 'vsvg-parser' );

console.log( parser.parse( '<svg><line /></svg>' ) );
/*

[ { tagName: 'svg',
    attributes: {},
    children: 
     [ { tagName: 'line',
         attributes: {},
         children: [],
         text: null,
         inside: 0,
         closed: true,
         position: [ 0, 0 ] } ],
    text: null,
    inside: -1,
    closed: true,
    position: [ 0 ] } ]

*/