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

remix-hook-form

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remix-hook-form - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

24

dist/index.js
// src/utilities/index.ts
var tryParseJSON = (jsonString) => {
if (jsonString === "null") {
return null;
}
if (jsonString === "undefined") {
return void 0;
}
try {
const json = JSON.parse(jsonString);
if (typeof json === "object" || typeof json === "boolean" || typeof json === "string") {
return json;
}
return jsonString;
return json;
} catch (e) {

@@ -79,15 +70,6 @@ return jsonString;

Object.entries(data).map(([key, value]) => {
if (Array.isArray(value)) {
formData.append(key, JSON.stringify(value));
} else if (value instanceof File || value instanceof Blob) {
if (value instanceof File || value instanceof Blob) {
formData.append(key, value);
} else if (typeof value === "object" && value !== null) {
} else
formData.append(key, JSON.stringify(value));
} else if (typeof value === "boolean") {
formData.append(key, value.toString());
} else if (typeof value === "number") {
formData.append(key, value.toString());
} else {
formData.append(key, value);
}
});

@@ -94,0 +76,0 @@ return formData;

2

package.json
{
"name": "remix-hook-form",
"version": "3.1.0",
"version": "3.2.0",
"description": "Utility wrapper around react-hook-form for use with Remix.run",

@@ -5,0 +5,0 @@ "type": "module",

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