Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

decode-formdata

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

decode-formdata - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

2

./dist/index.js

@@ -29,3 +29,3 @@ // src/utils/getFieldDate/getFieldDate.ts

if (info?.booleans?.includes(templateName)) {
return true;
return value !== "false" && value !== "0";
}

@@ -32,0 +32,0 @@ if (typeof value === "string") {

/**
* Returns the decoded date of a form field.
* Returns the decoded date of a field.
*
* @param value The form field value.
* @param value The field value.
*

@@ -30,3 +30,3 @@ * @returns The decoded date.

*/
declare function getFieldValue(info: FormDataInfo | undefined, templateName: string, value: FormDataEntryValue): number | true | Date | FormDataEntryValue;
declare function getFieldValue(info: FormDataInfo | undefined, templateName: string, value: FormDataEntryValue): number | boolean | Date | FormDataEntryValue;

@@ -33,0 +33,0 @@ /**

@@ -29,3 +29,3 @@ // src/utils/getFieldDate/getFieldDate.ts

if (info?.booleans?.includes(templateName)) {
return true;
return value !== "false" && value !== "0";
}

@@ -32,0 +32,0 @@ if (typeof value === "string") {

{
"name": "decode-formdata",
"description": "Decodes complex FormData into a JavaScript object",
"version": "0.1.1",
"version": "0.2.0",
"license": "MIT",

@@ -6,0 +6,0 @@ "author": "Fabian Hiller",

@@ -20,3 +20,3 @@ # Decode FormData

```js
```ts
import { decode } from 'decode-formdata';

@@ -66,3 +66,3 @@ ```

```js
```ts
const formEntries = [

@@ -87,3 +87,3 @@ ['title', 'Red apple'],

```js
```ts
import { decode } from 'decode-formdata';

@@ -106,3 +106,3 @@

```js
```ts
const formValues = {

@@ -109,0 +109,0 @@ title: 'Red apple',

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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