cf-map-form-to-object

1.0.0 • Public • Published

cf-map-form-to-object

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

Installation

npm install --save cf-map-form-to-object

Usage

var mapFormToObject = require('cf-map-form-to-object')
  , 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

/cf-map-form-to-object/

    Package Sidebar

    Install

    npm i cf-map-form-to-object

    Weekly Downloads

    18

    Version

    1.0.0

    License

    none

    Last publish

    Collaborators

    • dompainter
    • serby
    • bengourley