Extract and set form values through the DOM—no frameworks required! https://github.com/TheoryOfNekomata/formxtra
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
TheoryOfNekomata c0d6405873 Add README 3 роки тому
cypress Implement cypress 3 роки тому
src Organize tests 3 роки тому
test Organize tests 3 роки тому
.gitignore Initial commit 3 роки тому
LICENSE Initial commit 3 роки тому
README.md Add README 3 роки тому
cypress.json Implement cypress 3 роки тому
jest.config.js Implement tests 3 роки тому
package.json Implement cypress 3 роки тому
tsconfig.json Implement tests 3 роки тому
yarn.lock Implement cypress 3 роки тому

README.md

get-form-values

Get the value of a form using HTMLFormElement.elements.

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.