smallorange-svg-parser

1.0.3 • Public • Published

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
	}

Readme

Keywords

none

Package Sidebar

Install

npm i smallorange-svg-parser

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

46 kB

Total Files

7

Last publish

Collaborators

  • feliperohde