Skip to content

Convert a Formalist AST into a plain old JavaScript object of its values

Notifications You must be signed in to change notification settings

team-formalist/formalist-data-object-renderer

Repository files navigation

Formalist Data Object Renderer

Convert a Formalist AST into a plain old JavaScript object of its values. It will discard any presentational data associated with the form definition.

Usage

import createDataObjectRenderer from 'formalist-data-object-renderer'
const dataObjectRenderer = createDataObjectRenderer()

const data = [...] // Formalist compatible AST

const dataObject = dataObjectRenderer(data)
// -> { ... data as object }

Tests

$ npm run test

About

Convert a Formalist AST into a plain old JavaScript object of its values

Resources

Stars

Watchers

Forks

Packages

No packages published