Huge News!Announcing our $40M Series B led by Abstract Ventures.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
  • Socket score

Version published
Maintainers
2
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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc