formdata-polyfill
Advanced tools
Comparing version 4.0.2 to 4.0.3
@@ -43,3 +43,3 @@ /* global FormData self Blob File */ | ||
global.File = function File (b, d, c) { | ||
const blob = new Blob(b, c || {s}) | ||
const blob = new Blob(b, c || {}) | ||
const t = c && void 0 !== c.lastModified ? new Date(c.lastModified) : new Date() | ||
@@ -46,0 +46,0 @@ |
@@ -11,3 +11,3 @@ ;(function(){var h;function l(a){var c=0;return function(){return c<a.length?{done:!1,value:a[c++]}:{done:!0}}}var m="function"==typeof Object.defineProperties?Object.defineProperty:function(a,c,b){if(a==Array.prototype||a==Object.prototype)return a;a[c]=b.value;return a}; | ||
if("undefined"!==typeof Blob&&("undefined"===typeof FormData||!FormData.prototype.keys)){var L=function(a,c){for(var b=0;b<a.length;b++)c(a[b])},M=function(a,c,b){if(c instanceof Blob){b=void 0!==b?String(b+""):"string"===typeof c.name?c.name:"blob";if(c.name!==b||"[object Blob]"===Object.prototype.toString.call(c))c=new File([c],b);return[String(a),c]}return[String(a),String(c)]},N=function(a,c){if(a.length<c)throw new TypeError(c+" argument required, but only "+a.length+" present.");},O="object"=== | ||
typeof globalThis?globalThis:"object"===typeof window?window:"object"===typeof self?self:this,P=O.FormData,Q=O.XMLHttpRequest&&O.XMLHttpRequest.prototype.send,R=O.Request&&O.fetch,S=O.navigator&&O.navigator.sendBeacon,T=O.Element&&O.Element.prototype,U=O.Symbol&&Symbol.toStringTag;U&&(Blob.prototype[U]||(Blob.prototype[U]="Blob"),"File"in O&&!File.prototype[U]&&(File.prototype[U]="File"));try{new File([],"")}catch(a){O.File=function(c,b,d){c=new Blob(c,d||{H:s});d=d&&void 0!==d.lastModified?new Date(d.lastModified): | ||
typeof globalThis?globalThis:"object"===typeof window?window:"object"===typeof self?self:this,P=O.FormData,Q=O.XMLHttpRequest&&O.XMLHttpRequest.prototype.send,R=O.Request&&O.fetch,S=O.navigator&&O.navigator.sendBeacon,T=O.Element&&O.Element.prototype,U=O.Symbol&&Symbol.toStringTag;U&&(Blob.prototype[U]||(Blob.prototype[U]="Blob"),"File"in O&&!File.prototype[U]&&(File.prototype[U]="File"));try{new File([],"")}catch(a){O.File=function(c,b,d){c=new Blob(c,d||{});d=d&&void 0!==d.lastModified?new Date(d.lastModified): | ||
new Date;Object.defineProperties(c,{name:{value:b},lastModifiedDate:{value:d},lastModified:{value:+d},toString:{value:function(){return"[object File]"}}});U&&Object.defineProperty(c,U,{value:"File"});return c}}var V=function(a){this.i=[];var c=this;a&&L(a.elements,function(b){if(b.name&&!b.disabled&&"submit"!==b.type&&"button"!==b.type&&!b.matches("form fieldset[disabled] *"))if("file"===b.type){var d=b.files&&b.files.length?b.files:[new File([],"",{type:"application/octet-stream"})];L(d,function(e){c.append(b.name, | ||
@@ -14,0 +14,0 @@ e)})}else"select-multiple"===b.type||"select-one"===b.type?L(b.options,function(e){!e.disabled&&e.selected&&c.append(b.name,e.value)}):"checkbox"===b.type||"radio"===b.type?b.checked&&c.append(b.name,b.value):(d="textarea"===b.type?b.value.replace(/\r\n/g,"\n").replace(/\n/g,"\r\n"):b.value,c.append(b.name,d))})};h=V.prototype;h.append=function(a,c,b){N(arguments,2);this.i.push(M(a,c,b))};h["delete"]=function(a){N(arguments,1);var c=[];a=String(a);L(this.i,function(b){b[0]!==a&&c.push(b)});this.i= |
{ | ||
"name": "formdata-polyfill", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "HTML5 `FormData` for Browsers and Node.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29526
481