Skip to content

Latest commit

 

History

History
22 lines (14 loc) · 487 Bytes

README.md

File metadata and controls

22 lines (14 loc) · 487 Bytes

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