formdata-polyfill
Advanced tools
Comparing version 4.0.1 to 4.0.2
@@ -43,3 +43,3 @@ /* global FormData self Blob File */ | ||
global.File = function File (b, d, c) { | ||
const blob = new Blob(b, c) | ||
const blob = new Blob(b, c || {s}) | ||
const t = c && void 0 !== c.lastModified ? new Date(c.lastModified) : new Date() | ||
@@ -46,0 +46,0 @@ |
@@ -10,5 +10,5 @@ ;(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}; | ||
function J(a){this.next=function(c){return a.o(c)};this["throw"]=function(c){return a.s(c)};this["return"]=function(c){return I(a,c)};this[Symbol.iterator]=function(){return this}}function K(a,c){var b=new J(new F(c));B&&a.prototype&&B(b,a.prototype);return b} | ||
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){return c instanceof Blob&&(b=void 0!==b?String(b+""):"string"===typeof c.name?c.name:"blob",c.name!==b||"[object Blob]"===Object.prototype.toString.call(c))?(c=new File([c],b),[String(b),c]):[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);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, | ||
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): | ||
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, | ||
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= | ||
@@ -15,0 +15,0 @@ c};h.entries=function c(){var b,d=this;return K(c,function(e){1==e.h&&(b=0);if(3!=e.h)return b<d.i.length?e=E(e,d.i[b]):(e.h=0,e=void 0),e;b++;e.h=2})};h.forEach=function(c,b){N(arguments,1);for(var d=v(this),e=d.next();!e.done;e=d.next()){var f=v(e.value);e=f.next().value;f=f.next().value;c.call(b,f,e,this)}};h.get=function(c){N(arguments,1);var b=this.i;c=String(c);for(var d=0;d<b.length;d++)if(b[d][0]===c)return b[d][1];return null};h.getAll=function(c){N(arguments,1);var b=[];c=String(c);L(this.i, |
{ | ||
"name": "formdata-polyfill", | ||
"version": "4.0.1", | ||
"version": "4.0.2", | ||
"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
29530
482