New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@switch-company/form-utils

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@switch-company/form-utils

Convenience methods for form datas

1.0.0
latest
Source
npm
Version published
Weekly downloads
0
-100%
Maintainers
2
Weekly downloads
 
Created
Source

Switch - formUtils

Convenience methods for form datas

.toJSON( HTMLFormElement, Boolean )

Return a JSON object containing the name and values of each field element of the form. If the form contains fields with the same name, the values of those fields will be in an array.

Parameters

  • HTMLFormElement - the form element you want the data from
  • Boolean - Whether or not limit the object to string values. Filter out file inputs. Defaults to false.

.toQuery( HTMLFormElement )

Retrun a query string without the leading ?.

.hasFile( HTMLForElement )

Return true if the form has at least one file input that is not empty.

FAQs

Package last updated on 29 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts