Extract and set form values through the DOM—no frameworks required! https://github.com/TheoryOfNekomata/formxtra
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
TheoryOfNekomata 3b46b67247 Unify tests 3年前
cypress Implement cypress 3年前
src Unify tests 3年前
test Unify tests 3年前
.gitignore Initial commit 3年前
LICENSE Initial commit 3年前
README.md Update README 3年前
cypress.json Unify tests 3年前
jest.config.js Unify tests 3年前
package.json Unify tests 3年前
tsconfig.json Implement tests 3年前
yarn.lock Unify tests 3年前

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.