This package has been deprecated

Author message:

Moved to @parametric-svg/ast

parametric-svg-ast

1.0.1 • Public • Published

Coveralls – test coverage Travis – build status David – status of dependencies Code style: airbnb

parametric.svg AST

The internal format of parametric.svg

 

What’s up?

This repo describes the structure of objects that different parts of parametric.svg use to communicate with each other. Here’s some reasoning behind the idea.

 

Install

npm install parametric-svg-ast
 

Use

const ast = require('parametric-svg-ast');
 
const myAst = ast({
  attributes: [
    {
      address: [2, 5, 4],
      name: 'width',
      dependencies: ['a', 'b'],
      relation: (a, b) => a + b,
    },
    {
      address: [4, 8],
      name: 'height',
      dependencies: [],
      relation: () => 59,
    },
  ],
 
  defaults: [
    {
      identifier: 'a',
      dependencies: [],
      relation: () => 10,
    },
    {
      identifier: 'b',
      dependencies: [],
      relation: () => 20,
    },
  ]
});
//» { type: 'ParametricSvgAst',
//    version: 1,
//    attributes: [object Set],
//    defaults: [object Set] }
 

API

See the API docs in the source. If you can help us render them in the readme, that would be awesome!

 

License

MIT © Tomek Wiszniewski

Readme

Keywords

Package Sidebar

Install

npm i parametric-svg-ast

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • tomekwi