@jackfish/map-form-to-object

2.0.0 • Public • Published

@jackfish/map-form-to-object

Map form field values onto object properties, via matching form field and schema property names

Installation

npm install --save @jackfish/map-form-to-object

Usage

var mapFormToObject = require('@jackfish/map-form-to-object')
var schema = require('./article-schema')()

var formData = mapFormToObject($('form'), schema)
// formData will be an object with any values for schema properties
// that could be extracted from the form by [name] attributes.

Credits

Built by developers at Clock.

Licence

Licensed under the New BSD License

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    1

Package Sidebar

Install

npm i @jackfish/map-form-to-object

Weekly Downloads

1

Version

2.0.0

License

none

Unpacked Size

3.41 kB

Total Files

3

Last publish

Collaborators

  • jack828