MCPcopy Create free account
hub / github.com/TanStack/query / processExports

Function processExports

packages/angular-query/scripts/prepack.js:58–71  ·  view source on GitHub ↗

* Recursively processes package.json `exports` to remove dist prefixes * @param {Record } exports - The exports object to process * @returns {Record } The processed exports object

(exports)

Source from the content-addressed store, hash-verified

56 * @returns {Record<string, any>} The processed exports object
57 */
58function processExports(exports) {
59 return Object.fromEntries(
60 Object.entries(exports)
61 .filter(([key]) => key !== '@tanstack/custom-condition')
62 .map(([key, value]) => [
63 key,
64 typeof value === 'string'
65 ? replaceDist(value)
66 : typeof value === 'object' && value !== null
67 ? processExports(value)
68 : value,
69 ]),
70 )
71}
72
73console.log('Copying modified package.json')
74

Callers 1

prepack.jsFile · 0.70

Calls 1

replaceDistFunction · 0.70

Tested by

no test coverage detected