Extract and set form values through the DOM—no frameworks required! https://github.com/TheoryOfNekomata/formxtra
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
TheoryOfNekomata 16d3990a7d Fix tests hace 3 años
cypress Implement cypress hace 3 años
src Unify tests hace 3 años
test Fix tests hace 3 años
.gitignore Initial commit hace 3 años
LICENSE Initial commit hace 3 años
README.md Update README hace 3 años
cypress.json Unify tests hace 3 años
jest.config.js Unify tests hace 3 años
package.json Unify tests hace 3 años
tsconfig.json Implement tests hace 3 años
yarn.lock Fix tests hace 3 años

README.md

get-form-values

Get the value of a form using HTMLFormElement.elements.

Installation

The library is not yet out on any package manager. Installing through the URL is the preferred way.

Usage

import getFormValues from '@theoryofnekomata/get-form-values';

const form = document.getElementById('form')

// optional, but just in case there are multiple submit buttons in the form,
// individual submitters can be considered
const submitter = form.querySelector('[type="submit"]')

const values = getFormValues(form, submitter)

Tests

The library has been tested on JSDOM through Jest, and the real DOM using Cypress.