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

browser-fs-access

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-fs-access - npm Package Compare versions

Comparing version 0.24.0 to 0.24.1

2

dist/cjs/index.js

@@ -1,2 +0,2 @@

var m=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var _=Object.prototype.hasOwnProperty;var M=e=>m(e,"__esModule",{value:!0});var d=(e,t)=>()=>(e&&(t=e(e=0)),t);var f=(e,t)=>{for(var a in t)m(e,a,{get:t[a],enumerable:!0})},B=(e,t,a,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of U(t))!_.call(e,i)&&(a||i!=="default")&&m(e,i,{get:()=>t[i],enumerable:!(r=I(t,i))||r.enumerable});return e};var D=(e=>(t,a)=>e&&e.get(t)||(a=B(M({}),t,1),e&&e.set(t,a),a))(typeof WeakMap!="undefined"?new WeakMap:0);var p={};f(p,{default:()=>W});var W,w=d(()=>{W=async(e=[{}])=>(Array.isArray(e)||(e=[e]),new Promise((t,a)=>{let r=document.createElement("input");r.type="file";let i=[...e.map(s=>s.mimeTypes||[]).join(),e.map(s=>s.extensions||[]).join()].join();r.multiple=e[0].multiple||!1,r.accept=i||"";let l=()=>n(a),c=s=>{typeof n=="function"&&n(),t(s)},n=e[0].legacySetup&&e[0].legacySetup(c,l,r);r.addEventListener("change",()=>{c(r.multiple?Array.from(r.files):r.files[0])}),r.click()}))});var h={};f(h,{default:()=>q});var $,q,o=d(()=>{$=async e=>{let t=await e.getFile();return t.handle=e,t},q=async(e=[{}])=>{Array.isArray(e)||(e=[e]);let t=[];e.forEach((i,l)=>{t[l]={description:i.description||"",accept:{}},i.mimeTypes?i.mimeTypes.map(c=>{t[l].accept[c]=i.extensions||[]}):t[l].accept["*/*"]=i.extensions||[]});let a=await window.showOpenFilePicker({id:e[0].id,startIn:e[0].startIn,types:t,multiple:e[0].multiple||!1,excludeAcceptAllOption:e[0].excludeAcceptAllOption||!1}),r=await Promise.all(a.map($));return e[0].multiple?r:r[0]}});var v={};f(v,{default:()=>C});var C,x=d(()=>{C=async(e=[{}])=>(Array.isArray(e)||(e=[e]),e[0].recursive=e[0].recursive||!1,new Promise((t,a)=>{let r=document.createElement("input");r.type="file",r.webkitdirectory=!0;let i=()=>c(a),l=n=>{typeof c=="function"&&c(),t(n)},c=e[0].legacySetup&&e[0].legacySetup(l,i,r);r.addEventListener("change",()=>{let n=Array.from(r.files);e[0].recursive?e[0].recursive&&e[0].skipDirectory&&(n=n.filter(s=>s.webkitRelativePath.split("/").every(N=>!e[0].skipDirectory({name:N,kind:"directory"})))):n=n.filter(s=>s.webkitRelativePath.split("/").length===2),l(n)}),r.click()}))});var k={};f(k,{default:()=>G});var g,G,P=d(()=>{g=async(e,t,a=e.name,r)=>{let i=[],l=[];for await(let c of e.values()){let n=`${a}/${c.name}`;c.kind==="file"?l.push(c.getFile().then(s=>(s.directoryHandle=e,s.handle=c,Object.defineProperty(s,"webkitRelativePath",{configurable:!0,enumerable:!0,get:()=>n})))):c.kind==="directory"&&t&&(!r||!r(c))&&i.push(g(c,t,n,r))}return[...(await Promise.all(i)).flat(),...await Promise.all(l)]},G=async(e={})=>{e.recursive=e.recursive||!1;let t=await window.showDirectoryPicker({id:e.id,startIn:e.startIn});return g(t,e.recursive,void 0,e.skipDirectory)}});var L={};f(L,{default:()=>K});async function Q(e,t){let a=e.getReader(),r=new ReadableStream({start(l){return c();async function c(){return a.read().then(({done:n,value:s})=>{if(n){l.close();return}return l.enqueue(s),c()})}}}),i=new Response(r);return a.releaseLock(),new Blob([await i.blob()],{type:t})}var K,S=d(()=>{K=async(e,t={})=>{Array.isArray(t)&&(t=t[0]);let a=document.createElement("a"),r=e;"body"in e&&(r=await Q(e.body,e.headers.get("content-type"))),a.download=t.fileName||"Untitled",a.href=URL.createObjectURL(r);let i=()=>c(reject),l=()=>{typeof c=="function"&&c()},c=t.legacySetup&&t.legacySetup(l,i,a);return a.addEventListener("click",()=>{setTimeout(()=>URL.revokeObjectURL(a.href),30*1e3),l(null)}),a.click(),null}});var T={};f(T,{default:()=>R});var R,F=d(()=>{R=async(e,t=[{}],a=null,r=!1)=>{Array.isArray(t)||(t=[t]),t[0].fileName=t[0].fileName||"Untitled";let i=[];if(t.forEach((n,s)=>{i[s]={description:n.description||"",accept:{}},n.mimeTypes?(s===0&&(e.type?n.mimeTypes.push(e.type):e.headers&&e.headers.get("content-type")&&n.mimeTypes.push(e.headers.get("content-type"))),n.mimeTypes.map(y=>{i[s].accept[y]=n.extensions||[]})):e.type&&(i[s].accept[e.type]=n.extensions||[])}),a)try{await a.getFile()}catch(n){if(a=null,r)throw n}let l=a||await window.showSaveFilePicker({suggestedName:t[0].fileName,id:t[0].id,startIn:t[0].startIn,types:i,excludeAcceptAllOption:t[0].excludeAcceptAllOption||!1}),c=await l.createWritable();return"stream"in e?(await e.stream().pipeTo(c),l):"body"in e?(await e.body.pipeTo(c),l):(await c.write(blob),await c.close(),l)}});var X={};f(X,{directoryOpen:()=>j,fileOpen:()=>A,fileSave:()=>E,supported:()=>u});var O=(()=>{if(typeof self=="undefined")return!1;if("top"in self&&self!==top)try{top.location+""}catch{return!1}else if("showOpenFilePicker"in self)return"showOpenFilePicker";return!1})(),u=O;var z=u?Promise.resolve().then(()=>(o(),h)):Promise.resolve().then(()=>(w(),p));async function A(...e){return(await z).default(...e)}var J=u?Promise.resolve().then(()=>(P(),k)):Promise.resolve().then(()=>(x(),v));async function j(...e){return(await J).default(...e)}var V=u?Promise.resolve().then(()=>(F(),T)):Promise.resolve().then(()=>(S(),L));async function E(...e){return(await V).default(...e)}module.exports=D(X);
var m=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var _=Object.prototype.hasOwnProperty;var M=e=>m(e,"__esModule",{value:!0});var d=(e,t)=>()=>(e&&(t=e(e=0)),t);var f=(e,t)=>{for(var a in t)m(e,a,{get:t[a],enumerable:!0})},B=(e,t,a,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of U(t))!_.call(e,i)&&(a||i!=="default")&&m(e,i,{get:()=>t[i],enumerable:!(r=I(t,i))||r.enumerable});return e};var D=(e=>(t,a)=>e&&e.get(t)||(a=B(M({}),t,1),e&&e.set(t,a),a))(typeof WeakMap!="undefined"?new WeakMap:0);var p={};f(p,{default:()=>W});var W,w=d(()=>{W=async(e=[{}])=>(Array.isArray(e)||(e=[e]),new Promise((t,a)=>{let r=document.createElement("input");r.type="file";let i=[...e.map(s=>s.mimeTypes||[]).join(),e.map(s=>s.extensions||[]).join()].join();r.multiple=e[0].multiple||!1,r.accept=i||"";let l=()=>n(a),c=s=>{typeof n=="function"&&n(),t(s)},n=e[0].legacySetup&&e[0].legacySetup(c,l,r);r.addEventListener("change",()=>{c(r.multiple?Array.from(r.files):r.files[0])}),r.click()}))});var h={};f(h,{default:()=>q});var $,q,o=d(()=>{$=async e=>{let t=await e.getFile();return t.handle=e,t},q=async(e=[{}])=>{Array.isArray(e)||(e=[e]);let t=[];e.forEach((i,l)=>{t[l]={description:i.description||"",accept:{}},i.mimeTypes?i.mimeTypes.map(c=>{t[l].accept[c]=i.extensions||[]}):t[l].accept["*/*"]=i.extensions||[]});let a=await window.showOpenFilePicker({id:e[0].id,startIn:e[0].startIn,types:t,multiple:e[0].multiple||!1,excludeAcceptAllOption:e[0].excludeAcceptAllOption||!1}),r=await Promise.all(a.map($));return e[0].multiple?r:r[0]}});var v={};f(v,{default:()=>C});var C,x=d(()=>{C=async(e=[{}])=>(Array.isArray(e)||(e=[e]),e[0].recursive=e[0].recursive||!1,new Promise((t,a)=>{let r=document.createElement("input");r.type="file",r.webkitdirectory=!0;let i=()=>c(a),l=n=>{typeof c=="function"&&c(),t(n)},c=e[0].legacySetup&&e[0].legacySetup(l,i,r);r.addEventListener("change",()=>{let n=Array.from(r.files);e[0].recursive?e[0].recursive&&e[0].skipDirectory&&(n=n.filter(s=>s.webkitRelativePath.split("/").every(N=>!e[0].skipDirectory({name:N,kind:"directory"})))):n=n.filter(s=>s.webkitRelativePath.split("/").length===2),l(n)}),r.click()}))});var k={};f(k,{default:()=>G});var g,G,P=d(()=>{g=async(e,t,a=e.name,r)=>{let i=[],l=[];for await(let c of e.values()){let n=`${a}/${c.name}`;c.kind==="file"?l.push(c.getFile().then(s=>(s.directoryHandle=e,s.handle=c,Object.defineProperty(s,"webkitRelativePath",{configurable:!0,enumerable:!0,get:()=>n})))):c.kind==="directory"&&t&&(!r||!r(c))&&i.push(g(c,t,n,r))}return[...(await Promise.all(i)).flat(),...await Promise.all(l)]},G=async(e={})=>{e.recursive=e.recursive||!1;let t=await window.showDirectoryPicker({id:e.id,startIn:e.startIn});return g(t,e.recursive,void 0,e.skipDirectory)}});var L={};f(L,{default:()=>K});async function Q(e,t){let a=e.getReader(),r=new ReadableStream({start(l){return c();async function c(){return a.read().then(({done:n,value:s})=>{if(n){l.close();return}return l.enqueue(s),c()})}}}),i=new Response(r);return a.releaseLock(),new Blob([await i.blob()],{type:t})}var K,S=d(()=>{K=async(e,t={})=>{Array.isArray(t)&&(t=t[0]);let a=document.createElement("a"),r=e;"body"in e&&(r=await Q(e.body,e.headers.get("content-type"))),a.download=t.fileName||"Untitled",a.href=URL.createObjectURL(r);let i=()=>c(reject),l=()=>{typeof c=="function"&&c()},c=t.legacySetup&&t.legacySetup(l,i,a);return a.addEventListener("click",()=>{setTimeout(()=>URL.revokeObjectURL(a.href),30*1e3),l(null)}),a.click(),null}});var T={};f(T,{default:()=>R});var R,F=d(()=>{R=async(e,t=[{}],a=null,r=!1)=>{Array.isArray(t)||(t=[t]),t[0].fileName=t[0].fileName||"Untitled";let i=[];if(t.forEach((n,s)=>{i[s]={description:n.description||"",accept:{}},n.mimeTypes?(s===0&&(e.type?n.mimeTypes.push(e.type):e.headers&&e.headers.get("content-type")&&n.mimeTypes.push(e.headers.get("content-type"))),n.mimeTypes.map(y=>{i[s].accept[y]=n.extensions||[]})):e.type&&(i[s].accept[e.type]=n.extensions||[])}),a)try{await a.getFile()}catch(n){if(a=null,r)throw n}let l=a||await window.showSaveFilePicker({suggestedName:t[0].fileName,id:t[0].id,startIn:t[0].startIn,types:i,excludeAcceptAllOption:t[0].excludeAcceptAllOption||!1}),c=await l.createWritable();return"stream"in e?(await e.stream().pipeTo(c),l):"body"in e?(await e.body.pipeTo(c),l):(await c.write(blob),await c.close(),l)}});var X={};f(X,{directoryOpen:()=>j,fileOpen:()=>A,fileSave:()=>E,supported:()=>u});var O=(()=>{if(typeof self>"u")return!1;if("top"in self&&self!==top)try{top.location+""}catch{return!1}else if("showOpenFilePicker"in self)return"showOpenFilePicker";return!1})(),u=O;var z=u?Promise.resolve().then(()=>(o(),h)):Promise.resolve().then(()=>(w(),p));async function A(...e){return(await z).default(...e)}var J=u?Promise.resolve().then(()=>(P(),k)):Promise.resolve().then(()=>(x(),v));async function j(...e){return(await J).default(...e)}var V=u?Promise.resolve().then(()=>(F(),T)):Promise.resolve().then(()=>(S(),L));async function E(...e){return(await V).default(...e)}module.exports=D(X);
// @license © 2020 Google LLC. Licensed under the Apache License, Version 2.0.

@@ -1,2 +0,2 @@

var T=Object.defineProperty;var f=(e,t)=>()=>(e&&(t=e(e=0)),t);var d=(e,t)=>{for(var i in t)T(e,i,{get:t[i],enumerable:!0})};var y={};d(y,{default:()=>E});var E,p=f(()=>{E=async(e=[{}])=>(Array.isArray(e)||(e=[e]),new Promise((t,i)=>{let r=document.createElement("input");r.type="file";let l=[...e.map(s=>s.mimeTypes||[]).join(),e.map(s=>s.extensions||[]).join()].join();r.multiple=e[0].multiple||!1,r.accept=l||"";let n=()=>c(i),a=s=>{typeof c=="function"&&c(),t(s)},c=e[0].legacySetup&&e[0].legacySetup(a,n,r);r.addEventListener("change",()=>{a(r.multiple?Array.from(r.files):r.files[0])}),r.click()}))});var w={};d(w,{default:()=>I});var N,I,h=f(()=>{N=async e=>{let t=await e.getFile();return t.handle=e,t},I=async(e=[{}])=>{Array.isArray(e)||(e=[e]);let t=[];e.forEach((l,n)=>{t[n]={description:l.description||"",accept:{}},l.mimeTypes?l.mimeTypes.map(a=>{t[n].accept[a]=l.extensions||[]}):t[n].accept["*/*"]=l.extensions||[]});let i=await window.showOpenFilePicker({id:e[0].id,startIn:e[0].startIn,types:t,multiple:e[0].multiple||!1,excludeAcceptAllOption:e[0].excludeAcceptAllOption||!1}),r=await Promise.all(i.map(N));return e[0].multiple?r:r[0]}});var o={};d(o,{default:()=>M});var M,A=f(()=>{M=async(e=[{}])=>(Array.isArray(e)||(e=[e]),e[0].recursive=e[0].recursive||!1,new Promise((t,i)=>{let r=document.createElement("input");r.type="file",r.webkitdirectory=!0;let l=()=>a(i),n=c=>{typeof a=="function"&&a(),t(c)},a=e[0].legacySetup&&e[0].legacySetup(n,l,r);r.addEventListener("change",()=>{let c=Array.from(r.files);e[0].recursive?e[0].recursive&&e[0].skipDirectory&&(c=c.filter(s=>s.webkitRelativePath.split("/").every(S=>!e[0].skipDirectory({name:S,kind:"directory"})))):c=c.filter(s=>s.webkitRelativePath.split("/").length===2),n(c)}),r.click()}))});var x={};d(x,{default:()=>B});var v,B,g=f(()=>{v=async(e,t,i=e.name,r)=>{let l=[],n=[];for await(let a of e.values()){let c=`${i}/${a.name}`;a.kind==="file"?n.push(a.getFile().then(s=>(s.directoryHandle=e,s.handle=a,Object.defineProperty(s,"webkitRelativePath",{configurable:!0,enumerable:!0,get:()=>c})))):a.kind==="directory"&&t&&(!r||!r(a))&&l.push(v(a,t,c,r))}return[...(await Promise.all(l)).flat(),...await Promise.all(n)]},B=async(e={})=>{e.recursive=e.recursive||!1;let t=await window.showDirectoryPicker({id:e.id,startIn:e.startIn});return v(t,e.recursive,void 0,e.skipDirectory)}});var k={};d(k,{default:()=>W});async function $(e,t){let i=e.getReader(),r=new ReadableStream({start(n){return a();async function a(){return i.read().then(({done:c,value:s})=>{if(c){n.close();return}return n.enqueue(s),a()})}}}),l=new Response(r);return i.releaseLock(),new Blob([await l.blob()],{type:t})}var W,P=f(()=>{W=async(e,t={})=>{Array.isArray(t)&&(t=t[0]);let i=document.createElement("a"),r=e;"body"in e&&(r=await $(e.body,e.headers.get("content-type"))),i.download=t.fileName||"Untitled",i.href=URL.createObjectURL(r);let l=()=>a(reject),n=()=>{typeof a=="function"&&a()},a=t.legacySetup&&t.legacySetup(n,l,i);return i.addEventListener("click",()=>{setTimeout(()=>URL.revokeObjectURL(i.href),30*1e3),n(null)}),i.click(),null}});var j={};d(j,{default:()=>q});var q,L=f(()=>{q=async(e,t=[{}],i=null,r=!1)=>{Array.isArray(t)||(t=[t]),t[0].fileName=t[0].fileName||"Untitled";let l=[];if(t.forEach((c,s)=>{l[s]={description:c.description||"",accept:{}},c.mimeTypes?(s===0&&(e.type?c.mimeTypes.push(e.type):e.headers&&e.headers.get("content-type")&&c.mimeTypes.push(e.headers.get("content-type"))),c.mimeTypes.map(m=>{l[s].accept[m]=c.extensions||[]})):e.type&&(l[s].accept[e.type]=c.extensions||[])}),i)try{await i.getFile()}catch(c){if(i=null,r)throw c}let n=i||await window.showSaveFilePicker({suggestedName:t[0].fileName,id:t[0].id,startIn:t[0].startIn,types:l,excludeAcceptAllOption:t[0].excludeAcceptAllOption||!1}),a=await n.createWritable();return"stream"in e?(await e.stream().pipeTo(a),n):"body"in e?(await e.body.pipeTo(a),n):(await a.write(blob),await a.close(),n)}});var F=(()=>{if(typeof self=="undefined")return!1;if("top"in self&&self!==top)try{top.location+""}catch{return!1}else if("showOpenFilePicker"in self)return"showOpenFilePicker";return!1})(),u=F;var U=u?Promise.resolve().then(()=>(h(),w)):Promise.resolve().then(()=>(p(),y));async function _(...e){return(await U).default(...e)}var D=u?Promise.resolve().then(()=>(g(),x)):Promise.resolve().then(()=>(A(),o));async function O(...e){return(await D).default(...e)}var z=u?Promise.resolve().then(()=>(L(),j)):Promise.resolve().then(()=>(P(),k));async function C(...e){return(await z).default(...e)}export{O as directoryOpen,_ as fileOpen,C as fileSave,u as supported};
var T=Object.defineProperty;var f=(e,t)=>()=>(e&&(t=e(e=0)),t);var d=(e,t)=>{for(var i in t)T(e,i,{get:t[i],enumerable:!0})};var y={};d(y,{default:()=>E});var E,p=f(()=>{E=async(e=[{}])=>(Array.isArray(e)||(e=[e]),new Promise((t,i)=>{let r=document.createElement("input");r.type="file";let l=[...e.map(s=>s.mimeTypes||[]).join(),e.map(s=>s.extensions||[]).join()].join();r.multiple=e[0].multiple||!1,r.accept=l||"";let n=()=>c(i),a=s=>{typeof c=="function"&&c(),t(s)},c=e[0].legacySetup&&e[0].legacySetup(a,n,r);r.addEventListener("change",()=>{a(r.multiple?Array.from(r.files):r.files[0])}),r.click()}))});var w={};d(w,{default:()=>I});var N,I,h=f(()=>{N=async e=>{let t=await e.getFile();return t.handle=e,t},I=async(e=[{}])=>{Array.isArray(e)||(e=[e]);let t=[];e.forEach((l,n)=>{t[n]={description:l.description||"",accept:{}},l.mimeTypes?l.mimeTypes.map(a=>{t[n].accept[a]=l.extensions||[]}):t[n].accept["*/*"]=l.extensions||[]});let i=await window.showOpenFilePicker({id:e[0].id,startIn:e[0].startIn,types:t,multiple:e[0].multiple||!1,excludeAcceptAllOption:e[0].excludeAcceptAllOption||!1}),r=await Promise.all(i.map(N));return e[0].multiple?r:r[0]}});var o={};d(o,{default:()=>M});var M,A=f(()=>{M=async(e=[{}])=>(Array.isArray(e)||(e=[e]),e[0].recursive=e[0].recursive||!1,new Promise((t,i)=>{let r=document.createElement("input");r.type="file",r.webkitdirectory=!0;let l=()=>a(i),n=c=>{typeof a=="function"&&a(),t(c)},a=e[0].legacySetup&&e[0].legacySetup(n,l,r);r.addEventListener("change",()=>{let c=Array.from(r.files);e[0].recursive?e[0].recursive&&e[0].skipDirectory&&(c=c.filter(s=>s.webkitRelativePath.split("/").every(S=>!e[0].skipDirectory({name:S,kind:"directory"})))):c=c.filter(s=>s.webkitRelativePath.split("/").length===2),n(c)}),r.click()}))});var x={};d(x,{default:()=>B});var v,B,g=f(()=>{v=async(e,t,i=e.name,r)=>{let l=[],n=[];for await(let a of e.values()){let c=`${i}/${a.name}`;a.kind==="file"?n.push(a.getFile().then(s=>(s.directoryHandle=e,s.handle=a,Object.defineProperty(s,"webkitRelativePath",{configurable:!0,enumerable:!0,get:()=>c})))):a.kind==="directory"&&t&&(!r||!r(a))&&l.push(v(a,t,c,r))}return[...(await Promise.all(l)).flat(),...await Promise.all(n)]},B=async(e={})=>{e.recursive=e.recursive||!1;let t=await window.showDirectoryPicker({id:e.id,startIn:e.startIn});return v(t,e.recursive,void 0,e.skipDirectory)}});var k={};d(k,{default:()=>W});async function $(e,t){let i=e.getReader(),r=new ReadableStream({start(n){return a();async function a(){return i.read().then(({done:c,value:s})=>{if(c){n.close();return}return n.enqueue(s),a()})}}}),l=new Response(r);return i.releaseLock(),new Blob([await l.blob()],{type:t})}var W,P=f(()=>{W=async(e,t={})=>{Array.isArray(t)&&(t=t[0]);let i=document.createElement("a"),r=e;"body"in e&&(r=await $(e.body,e.headers.get("content-type"))),i.download=t.fileName||"Untitled",i.href=URL.createObjectURL(r);let l=()=>a(reject),n=()=>{typeof a=="function"&&a()},a=t.legacySetup&&t.legacySetup(n,l,i);return i.addEventListener("click",()=>{setTimeout(()=>URL.revokeObjectURL(i.href),30*1e3),n(null)}),i.click(),null}});var j={};d(j,{default:()=>q});var q,L=f(()=>{q=async(e,t=[{}],i=null,r=!1)=>{Array.isArray(t)||(t=[t]),t[0].fileName=t[0].fileName||"Untitled";let l=[];if(t.forEach((c,s)=>{l[s]={description:c.description||"",accept:{}},c.mimeTypes?(s===0&&(e.type?c.mimeTypes.push(e.type):e.headers&&e.headers.get("content-type")&&c.mimeTypes.push(e.headers.get("content-type"))),c.mimeTypes.map(m=>{l[s].accept[m]=c.extensions||[]})):e.type&&(l[s].accept[e.type]=c.extensions||[])}),i)try{await i.getFile()}catch(c){if(i=null,r)throw c}let n=i||await window.showSaveFilePicker({suggestedName:t[0].fileName,id:t[0].id,startIn:t[0].startIn,types:l,excludeAcceptAllOption:t[0].excludeAcceptAllOption||!1}),a=await n.createWritable();return"stream"in e?(await e.stream().pipeTo(a),n):"body"in e?(await e.body.pipeTo(a),n):(await a.write(blob),await a.close(),n)}});var F=(()=>{if(typeof self>"u")return!1;if("top"in self&&self!==top)try{top.location+""}catch{return!1}else if("showOpenFilePicker"in self)return"showOpenFilePicker";return!1})(),u=F;var U=u?Promise.resolve().then(()=>(h(),w)):Promise.resolve().then(()=>(p(),y));async function _(...e){return(await U).default(...e)}var D=u?Promise.resolve().then(()=>(g(),x)):Promise.resolve().then(()=>(A(),o));async function O(...e){return(await D).default(...e)}var z=u?Promise.resolve().then(()=>(L(),j)):Promise.resolve().then(()=>(P(),k));async function C(...e){return(await z).default(...e)}export{O as directoryOpen,_ as fileOpen,C as fileSave,u as supported};
// @license © 2020 Google LLC. Licensed under the Apache License, Version 2.0.

@@ -166,3 +166,3 @@ /**

skipDirectory?: (
fileSystemDirectoryEntry: FileSystemDirectoryEntry
entry: FileSystemDirectoryEntry | FileSystemDirectoryHandle
) => boolean;

@@ -169,0 +169,0 @@ /**

{
"name": "browser-fs-access",
"version": "0.24.0",
"version": "0.24.1",
"description": "File System Access API with legacy fallback in the browser.",

@@ -46,9 +46,9 @@ "browser": "./dist/esm/index.js",

"devDependencies": {
"esbuild": "^0.14.10",
"eslint": "^8.6.0",
"esbuild": "^0.14.23",
"eslint": "^8.9.0",
"eslint-config-google": "^0.14.0",
"eslint-config-prettier": "^8.3.0",
"http-server": "^14.0.0",
"eslint-config-prettier": "^8.4.0",
"http-server": "^14.1.0",
"prettier": "^2.5.1",
"shx": "^0.3.3"
"shx": "^0.3.4"
},

@@ -55,0 +55,0 @@ "eslintConfig": {

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