1.0.3 • Published 6 years ago

smallorange-svg-parser v1.0.3

Weekly downloads
2
License
MIT
Repository
-
Last release
6 years ago

CircleCI

Small SVG Parser

Simple internal SVG parser

Usage:

	const Parser = require('smallorange-svg-parser');
	const parser = new Parser({
		fill: `<%= get('background', 'fill') %>`,
		stroke: `<%= get('background', 'stroke') %>`
	});
	
	console.log(parser.parse(`<svg><path fill="#000"/></svg>`));
	

Output:

	{
		html: `
			<svg viewBox="0 0 49 49">
				<path get('background', 'fill')/>
			</svg>
		`,
		width: 49,
		height: 49
	}
1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago