form-data-to-object

WebJar for form-data-to-object

License

License

MIT
Categories

Categories

Data ORM
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

form-data-to-object
Last Version

Last Version

0.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

form-data-to-object
WebJar for form-data-to-object
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/christianalfoni/form-data-to-object

Download form-data-to-object

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/form-data-to-object/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>form-data-to-object</artifactId>
    <version>0.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/form-data-to-object/
implementation 'org.webjars.npm:form-data-to-object:0.2.0'
// https://jarcasting.com/artifacts/org.webjars.npm/form-data-to-object/
implementation ("org.webjars.npm:form-data-to-object:0.2.0")
'org.webjars.npm:form-data-to-object:jar:0.2.0'
<dependency org="org.webjars.npm" name="form-data-to-object" rev="0.2.0">
  <artifact name="form-data-to-object" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='form-data-to-object', version='0.2.0')
)
libraryDependencies += "org.webjars.npm" % "form-data-to-object" % "0.2.0"
[org.webjars.npm/form-data-to-object "0.2.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

form-data-to-object

Converts application/x-www-form-urlencoded data structure to plain JS object

API

  • formData.toObj() - Converts keys in x-www-form-urlencoded format on an object to a normal object
  • formData.fromObj() - Converts a normal object to object with keys in x-www-form-urlencoded format
// keys in x-www-form-urlencoded format
{
  'foo': 'bar',
  'foo2[name]': 'bar2',
  'foo3[0]': 'bar3',
  'foo3[1][name]': 'bar4'
}

// converts from/to

// normal object
{
  foo: 'bar',
  foo2: {
    name: 'bar2'
  },
  foo3: ['bar3', {
    name: 'bar4'
  }]
}

Versions

Version
0.2.0
0.1.0