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

@felte/common

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@felte/common - npm Package Compare versions

Comparing version 1.1.5 to 1.1.6

2

dist/cjs/dist/esm/utils/domUtils.d.ts

@@ -19,5 +19,5 @@ import type { FormControl, Obj, FieldValue, Touched } from '../types';

};
export declare function setControlValue(el: FormControl, value: FieldValue | FieldValue[]): void;
export declare function setControlValue(el: FormControl, value: FieldValue | FieldValue[] | FileList): void;
/** Sets the form inputs value to match the data object provided. */
export declare function setForm<Data extends Obj>(node: HTMLFormElement, data: Data): void;
//# sourceMappingURL=domUtils.d.ts.map

@@ -19,5 +19,5 @@ import type { FormControl, Obj, FieldValue, Touched } from '../types';

};
export declare function setControlValue(el: FormControl, value: FieldValue | FieldValue[]): void;
export declare function setControlValue(el: FormControl, value: FieldValue | FieldValue[] | FileList): void;
/** Sets the form inputs value to match the data object provided. */
export declare function setForm<Data extends Obj>(node: HTMLFormElement, data: Data): void;
//# sourceMappingURL=domUtils.d.ts.map

@@ -155,4 +155,23 @@ import { isFormControl, isFieldSetElement, isInputElement, isSelectElement } from './typeGuards.js';

if (el.type === 'file') {
el.files = null;
el.value = '';
if (value instanceof FileList) {
el.files = value;
}
else if (value instanceof File && typeof DataTransfer !== 'undefined') {
const dataTransfer = new DataTransfer();
dataTransfer.items.add(value);
el.files = dataTransfer.files;
}
else if (typeof DataTransfer !== 'undefined' &&
Array.isArray(value) &&
value.some((v) => v instanceof File)) {
const dataTransfer = new DataTransfer();
for (const file of value) {
file instanceof File && dataTransfer.items.add(file);
}
el.files = dataTransfer.files;
}
else if (!value || (Array.isArray(value) && !value.length)) {
el.files = null;
el.value = '';
}
return;

@@ -159,0 +178,0 @@ }

{
"name": "@felte/common",
"version": "1.1.5",
"version": "1.1.6",
"description": "Common utilities for Felte packages",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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