The FormBuilder Model package.
This package is a part of FormBuilder technology powered by Startapp.studio.
The model is a hierarchical representation of the DOM as JSON. Includes a visitor design pattern that allows you to change the representation of the model.
The key interface is
interface IModel {
name: string;
props: {
[prop: string]: any;
}
}
- Name is a form component’s name
- Props is an object with a component's attributes and their values
An example that shows how a model might look.
{
"name": "button",
"props": {
"type": "submit",
"class": "btn submit"
}
}
Test
npm run test
Licence
MIT