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.2.0 to 0.3.0

3

./dist/index.js
// src/utils/getFieldDate/getFieldDate.ts
function getFieldDate(value) {
if (!value) {
return null;
}
if (/^\d{4}-(0[1-9]|1[0-2])-([12]\d|0[1-9]|3[01])$/.test(value)) {

@@ -4,0 +7,0 @@ return /* @__PURE__ */ new Date(`${value}T00:00:00.000Z`);

4

dist/index.d.ts

@@ -8,3 +8,3 @@ /**

*/
declare function getFieldDate(value: string): Date;
declare function getFieldDate(value: string): Date | null;

@@ -31,3 +31,3 @@ /**

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

@@ -34,0 +34,0 @@ /**

// src/utils/getFieldDate/getFieldDate.ts
function getFieldDate(value) {
if (!value) {
return null;
}
if (/^\d{4}-(0[1-9]|1[0-2])-([12]\d|0[1-9]|3[01])$/.test(value)) {

@@ -4,0 +7,0 @@ return /* @__PURE__ */ new Date(`${value}T00:00:00.000Z`);

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

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

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