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

Function processExports

packages/angular-query-experimental/scripts/prepack.js:51–62  ·  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).map(([key, value]) => [
54 key,
55 typeof value === 'string'
56 ? replaceDist(value)
57 : typeof value === 'object' && value !== null
58 ? processExports(value)
59 : value,
60 ]),
61 )
62}
63
64console.log('Copying modified package.json')
65

Callers 1

prepack.jsFile · 0.85

Calls 1

replaceDistFunction · 0.85

Tested by

no test coverage detected