New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mutt/forms

Package Overview
Dependencies
Maintainers
13
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mutt/forms - npm Package Compare versions

Comparing version 2.4.0 to 2.5.0

2

package.json
{
"name": "@mutt/forms",
"version": "2.4.0",
"version": "2.5.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "author": {

@@ -55,3 +55,5 @@ /**

for (const fieldName of Object.keys(resolvedProps)) {
let fieldId = `${name}_${fieldName}`
let fieldId = options.usePathId
? `${id}_${fieldName}`
: `${name}_${fieldName}`
let fieldOptions = {}

@@ -71,2 +73,6 @@ let fieldRequired = false

if (!fieldOptions.hasOwnProperty('usePathId')) {
fieldOptions.usePathId = options.usePathId
}
let field = this.constructor.new(

@@ -73,0 +79,0 @@ fieldId,

@@ -206,2 +206,5 @@ /**

let fieldIdPrefix = ''
let usePathId = false
if (schema.hasOwnProperty("title")) {

@@ -215,2 +218,12 @@ fieldsetSpec.label = schema.title

}
// If this idPrefix is set in form's options we prefix the fields ids
if (options.form.hasOwnProperty("idPrefix")) {
fieldIdPrefix = `${options.form.idPrefix}_`
}
// If 'usePathId' is set to true in form's options we use "full path" ids
if (options.form.hasOwnProperty("usePathId")) {
usePathId = options.form.usePathId
}
}

@@ -232,3 +245,5 @@

for (const fieldName of Object.keys(schema)) {
let fieldId = `${fieldName}_field_${fieldIndex}`
let fieldId = usePathId
? `${fieldIdPrefix}${fieldName}_field` // Hierarchical/full path ids
: `${fieldIdPrefix}${fieldName}_field_${fieldIndex}` // Usual ids
let fieldSchema = schema[fieldName]

@@ -255,2 +270,8 @@ let fieldOptions = {}

// If userPathId is not explicitly set in this field's options,
// we pass the default/form usePathId down to the fields options
if (!fieldOptions.hasOwnProperty('usePathId')) {
fieldOptions.usePathId = usePathId
}
let field = Field.new(fieldId, fieldName, fieldSchema, fieldOptions)

@@ -257,0 +278,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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