Extract and set form values through the DOM—no frameworks required! https://github.com/TheoryOfNekomata/formxtra
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
TheoryOfNekomata 3b46b67247 Unify tests il y a 3 ans
cypress Implement cypress il y a 3 ans
src Unify tests il y a 3 ans
test Unify tests il y a 3 ans
.gitignore Initial commit il y a 3 ans
LICENSE Initial commit il y a 3 ans
README.md Update README il y a 3 ans
cypress.json Unify tests il y a 3 ans
jest.config.js Unify tests il y a 3 ans
package.json Unify tests il y a 3 ans
tsconfig.json Implement tests il y a 3 ans
yarn.lock Unify tests il y a 3 ans

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.