13.0.0 • Published 2 years ago

extract-files v13.0.0

Weekly downloads
1,658,652
License
MIT
Repository
github
Last release
2 years ago

extract-files

A function to recursively extract files and their object paths within a value, replacing them with null in a deep clone without mutating the original value. FileList instances are treated as File instance arrays. Files are typically File and Blob instances.

Used by GraphQL multipart request spec client implementations such as graphql-react and apollo-upload-client.

Installation

For Node.js, to install extract-files with npm, run:

npm install extract-files

For Deno and browsers, an example import map:

{
  "imports": {
    "extract-files/": "https://unpkg.com/extract-files@13.0.0/",
    "is-plain-obj": "https://unpkg.com/is-plain-obj@4.1.0/index.js",
    "is-plain-obj/": "https://unpkg.com/is-plain-obj@4.1.0/"
  }
}

See the function extractFiles to get started.

Requirements

Supported runtime environments:

Non Deno projects must configure TypeScript to use types from the ECMAScript modules that have a // @ts-check comment:

Exports

The npm package extract-files features optimal JavaScript module design. It doesn’t have a main index module, so use deep imports from the ECMAScript modules that are exported via the package.json field exports:

@cartons/apollo-upload@liquiditeam/sdkgraphql-hooks-test-g@r26d/absinthe-apollo-upload-clientapollo-upload-client-test-without-peer@prodam/prodam-types@everything-registry/sub-chunk-1639gullitmiranda-apollo-upload-clientgraphql-reactgraphql-request-configurable-serializergraphql-request-fischermangraphql-request-less-graphqlgraphql-request-msgpackgraphql-request-thetalesman-prmtipfsp2pmtspidermtspider-dbmtxemumtxipfs-dbgraphql-simple-fetchgraphql-tools-forkgraphql-hooksgraphql-hooks-with-get-supportgraphql-client-hybridharshit-apollo-upload-clientfixieformlareact-relay-network-modernreact-relay-network-modern-es@dukefun/js-ext@graphql-tools/executor-http@hex-inc/apollo-upload-client@j3a/graphql-request-light@fishx/graphql-client@fixieai/fixie@ivopatty/apollo-upload-client@mdwelsh/fixie@innoswap/default-token-listwebql-tools-url-loadertobilen-graphql-request@lolasasfi/splits-sdk@nailip/service@ecodev/naturalsvelte-gqlrewire-graphqlredux-offline-apollo-linkredux-saga-requests-graphqlreact-use-upload-tsreact-use-upload-typescript@msolano/nest-graphql@onfido/graphql-request@peajs/graphql-client@kzfoo-libs/service@outcast.by/js-ext@vahill/graphql-request@redux-requests/graphql@theaschr/graphql-request@urql/exchange-multipart-fetch@matters/apollo-upload-client@r26d/absinthe-apollo-upload-link@richeterre/apollo-upload-client@rproenza/graphql-request@villus/multipart@yoshokatana/apollo-upload-clientapollo-fetch-upload@anvilco/anvil@asiz33/smartblok-vendure-plugin@allsquare/apollo-upload-clientapollo-js-multipartapollo-upload-clientapollo-upload-client-tempapollo-upload-client-with-persisted-queriesapollo-upload-fileapollo-upload-filesapollo-vue-multipartapollo-upload-angular-link-httpapollo-angular-link-http@boter/graphql-clientcastle-api-client@conjecto/apollo-upload-client@bconnorwhite/graphql-tools-fork@data-fair/processing-bodacc@corpsmap/corpsmap@dh-test/dao-data
13.0.0

2 years ago

12.0.0

2 years ago

11.0.0

3 years ago

10.0.0

3 years ago

9.0.0

4 years ago

8.1.0

4 years ago

8.0.0

4 years ago

7.0.0

4 years ago

6.0.0

4 years ago

5.0.1

5 years ago

5.0.0

5 years ago

4.1.0

5 years ago

4.0.0

6 years ago

3.1.0

6 years ago

3.0.0

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago