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

Function processExports

packages/angular-query-devtools/scripts/prepack.js:51–64  ·  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

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

Callers 1

prepack.jsFile · 0.70

Calls 1

replaceDistFunction · 0.70

Tested by

no test coverage detected