@clocklimited/cf-map-form-to-object

2.0.0 • Public • Published

@clocklimited/cf-map-form-to-object

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

CircleCI

Installation

npm install --save @clocklimited/cf-map-form-to-object
npm install --save @clocklimited/schemata

Usage

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

Readme

Keywords

none

Package Sidebar

Install

npm i @clocklimited/cf-map-form-to-object

Weekly Downloads

17

Version

2.0.0

License

BSD-2-Clause

Unpacked Size

4.98 kB

Total Files

4

Last publish

Collaborators

  • mrstebo
  • scott-clock
  • clock-release-bot
  • steepnicki
  • asheboy