svg-transform-parser2

1.0.0 • Public • Published

svg-transform-parser2

Parse SVG transform in Javascript

Forked from nidu/svg-transform-parser, support multiple rules with same name.

Installation

npm install svg-transform-parser2

Usage

var parseSvgTransform = require('svg-transform-parser2').parse;

parseSvgTransform("translate(10,20) translate(2 0.5)");
// [
//     {
//         "key": "translate",
//         "value": {
//             "tx": 10,
//             "ty": 20
//         }
//     },
//     {
//         "key": "translate",
//         "value": {
//             "tx": 2,
//             "ty": 0.5
//         }
//     }
// ]

Compile pegjs

npm run-script compile

Tests

npm test

/svg-transform-parser2/

    Package Sidebar

    Install

    npm i svg-transform-parser2

    Weekly Downloads

    2

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    47.1 kB

    Total Files

    7

    Last publish

    Collaborators

    • yinyongcom666