@f/form-controls

    1.0.0 • Public • Published

    form-controls

    Build status Git tag NPM version Code style

    Retrieve a list of control elements from a form

    Installation

    $ npm install @f/form-controls
    

    Usage

    var controls = require('@f/form-controls')
     
    function serialize (form) {
      return controls
        .reduce(function (acc, ctrl) {
          acc[ctrl.name] = ctrl.value
          return acc
        }, {})
    }

    API

    formControls(form)

    Returns: An array of input controls within form.

    License

    MIT

    Keywords

    none

    Install

    npm i @f/form-controls

    DownloadsWeekly Downloads

    105

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • f