1.0.6 • Published 5 years ago

formalist-serialize-react v1.0.6

Weekly downloads
159
License
MIT
Repository
github
Last release
5 years ago

Formalist Serialize React

A React serializer for a Formalist-compatible abstract syntax tree. It’ll take your complex, nested AST and output a series of flat hidden-inputs.

Usage

import serialize from 'formalist-serialize-react'
const data = [...] // Formalist compatible AST
serialize(data)
// <input name="foo" value="bar" type="hidden"/>

You can set a prefix for the input names:

let options = {
  prefix: "user"
}
serialize(data, options)
// <input name="user[foo]" value="bar" type="hidden"/>

Tests

$ npm run test
1.0.6

5 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago