{"_id":"json-schema-cycles","_rev":"5-a273a9db307bb1cb21e9b7f0004807f3","name":"json-schema-cycles","dist-tags":{"latest":"3.0.0"},"versions":{"1.0.0":{"name":"json-schema-cycles","version":"1.0.0","description":"Analyize recursive (cyclic) JSON Schema types","author":{"name":"Gustaf Räntilä"},"license":"MIT","bugs":{"url":"https://github.com/grantila/json-schema-cycles/issues"},"homepage":"https://github.com/grantila/json-schema-cycles#readme","main":"./dist/index.js","types":"./dist/index.d.ts","directories":{},"engines":{"node":">=12"},"scripts":{"build":"rimraf dist && tsc -p tsconfig.prod.json","test":"jest --coverage","cz":"git-cz"},"repository":{"type":"git","url":"git+https://github.com/grantila/json-schema-cycles.git"},"keywords":["json","schema","jsonschema","cycles","cyclic","recursive"],"devDependencies":{"@types/jest":"^26.0.20","@types/node":"^14.14.31","cz-conventional-changelog":"^3.1.0","jest":"^26.6.3","rimraf":"^3.0.1","ts-jest":"^26.5.2","typescript":"^4.2.2"},"dependencies":{"graph-cycles":"^1.1.0","json-schema-traverse":"^1.0.0"},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"c8c0d57b2e56b6caa079afa2e9897652fbccc40f","_id":"json-schema-cycles@1.0.0","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-6jpL5yvSDUL1ii6nWU5ADh87XK0uhfMIgPlb/QRX2FG9vGNK9jpq73yfmvGG9ZxH6andGm7gYaAFJCuVo0eulw==","shasum":"3e5e620c30db99689bb9fc1c7b284b0e9f92c593","tarball":"https://registry.npmjs.org/json-schema-cycles/-/json-schema-cycles-1.0.0.tgz","fileCount":5,"unpackedSize":8568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZlrWCRA9TVsSAnZWagAAMi0P/2uEuUPB6WOGE9N6tEh/\n/k8YqXIx5GiEK1bgRXIToXumb2l6RYdkUvJ/IilIz5CWmsKDpOXcXYTV/A2G\n48SxAfEo1VGw6zgxtexUZ17D76WqEn1OQbPfvcFaD2PwZROatlGRXPMoZrrd\nAGClaLB7/4kOW/hCP3HO9dPYpC4OnpMfiNEYSvHFD93OFRBtUSXX3cRp25M3\nJg5uUpa48mnUl+rXFXCUZTliYveTwTVoY+NgyyMeNAdPqQdcfcW+2jCRaQNN\ncgcqckOcN22buQvsDaZ1fSc7yMITjtCuCaxeA40+cMMCLYGxAKWfXiVkwfQm\nWD3m51/t5zb2U2WIW39SfflQzkNzs8CaKFVO4ESV0TBowAAFVTCQglNonmoJ\nfPLmTr9PjMLvb5cO+bEzgQ6O8i3sSJcH2Fg9fZkXS7dqqCcEp1qv8vWbDxce\nwQl7aGXXuc7i8fEV6pRJXtlMrCxSEXl/FZuFtoV232l473jBxawU6jREJErK\n/TW2NkmHWy2AAk8r4WXVUJTizkvImcSV9WFpeGz63G8MSbvRexPe2izRQdYq\n7EuagdSil+hJIuLndABql0HfxEVcKXlhQ++UhQ3KCSDsabKfYFlIoRgXVh+k\nlf2FLHCPiW5taUBMLjIo+HdtIpUGWIb72eTqozhs5NaLuCMGEOXWl2CDxgb8\npD2Q\r\n=z3xf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDAg5jCd4hwNIS8+QeC0mBAn7PedRzSaP0ziOmVPnl2rgIgY9vzjFNs1LiErYdOKZ0RhB/ALCyO33QsbxtL6UjA6d4="}]},"_npmUser":{"name":"grantila","email":"g.rantila@gmail.com"},"maintainers":[{"name":"grantila","email":"g.rantila@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-schema-cycles_1.0.0_1617320661835_0.23412180257299586"},"_hasShrinkwrap":false},"1.1.0":{"name":"json-schema-cycles","version":"1.1.0","description":"Analyize recursive (cyclic) JSON Schema types","author":{"name":"Gustaf Räntilä"},"license":"MIT","bugs":{"url":"https://github.com/grantila/json-schema-cycles/issues"},"homepage":"https://github.com/grantila/json-schema-cycles#readme","main":"./dist/index.js","types":"./dist/index.d.ts","directories":{},"engines":{"node":">=12"},"scripts":{"build":"rimraf dist && tsc -p tsconfig.prod.json","test":"jest --coverage","cz":"git-cz"},"repository":{"type":"git","url":"git+https://github.com/grantila/json-schema-cycles.git"},"keywords":["json","schema","jsonschema","cycles","cyclic","recursive"],"devDependencies":{"@types/jest":"^26.0.20","@types/node":"^14.14.31","cz-conventional-changelog":"^3.1.0","jest":"^26.6.3","rimraf":"^3.0.1","ts-jest":"^26.5.2","typescript":"^4.2.4"},"dependencies":{"graph-cycles":"^1.2.1","json-schema-traverse":"^1.0.0"},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"e998f9749a10b8108c240c3308c22a8d6d2ad89a","_id":"json-schema-cycles@1.1.0","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-vcoGVsVokTaYsbI0SJj0eyGB81S7+3fZYH358bRcW9/yzlUOjNleCSupg8mTM9Co1RBPjUXv+hUmH559lgeFvQ==","shasum":"a18e45a8e253ab2b9f30c09bdc9ea9fd646f5075","tarball":"https://registry.npmjs.org/json-schema-cycles/-/json-schema-cycles-1.1.0.tgz","fileCount":5,"unpackedSize":11122,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcsiECRA9TVsSAnZWagAA1osP+QCgAnmVOr4OUHQu4Sa6\nIAgHwD3HNWJAzIUV8r8xIOVgU8FWnGIKzoS944/iwfjquWoIUOGQp7e5lG+K\nXXIljbJIZUXeRqHvEqhlCcCmLNXIFeVsWs3VsOBfHeLQ19ECZsESk2AGVfnj\nzyVyu/bnWD3vG9Y5RQejBYDmLFsi5onDyw2NF5AS5+oAUW8XooY+8RkySlHt\n69SHLe1uR+63zNWdI9ggu11oPYL5zLfp40WmTJIEElZHiSquJWAO2vldFbPh\n7Pna3zA9l+Fip1YmBuPGpa5jtylwHlRS0s5loMwmZW0ZDrpqiekq4J+dC10U\niJU569CybYiVNG5vi+2emx4B32m4qK18Z436ArNuUJlr4ONI9XNhp6Bdge/Q\nglG3GTBouWpkx5mEWbnFrS70flc7FBTZAgl9OQJJ2om+NeZqTN1R6z1rhVWc\nDfo61hQTxqO6JQTWFR0UEXJg2C6LQ93NbP9pBVRRtSIFQdbdeUKClaBN1KL4\nk+J6AgxGXpE3gnexni9fGp5vy2Ns0JEDZtpKmXsrsci06o+/YGkfKNMjZF85\nNpU1QceNTY1ANA2+3sNrRTFL7GR5cWR0d0AHsaAiucsg16XeCM1F3zWt2zKc\nb+XaEvZkk3a98+/WbyG8qz7jqH5Unxu2FwblDnUY0OJMBP3ODnBXAKhthB3i\nYv8p\r\n=XqMf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTVrzJmowBjzxoP1rs2GiCJZp+BqEhUdU5RJxcl06StgIgItIUHLjpEYVKlD/bTNwz223VtHLmh9SaXIxnDJpKFbc="}]},"_npmUser":{"name":"grantila","email":"g.rantila@gmail.com"},"maintainers":[{"name":"grantila","email":"g.rantila@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-schema-cycles_1.1.0_1618135172358_0.07813197955304818"},"_hasShrinkwrap":false},"2.0.0":{"name":"json-schema-cycles","version":"2.0.0","description":"Analyize recursive (cyclic) JSON Schema types","author":{"name":"Gustaf Räntilä"},"license":"MIT","bugs":{"url":"https://github.com/grantila/json-schema-cycles/issues"},"homepage":"https://github.com/grantila/json-schema-cycles#readme","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","type":"module","sideEffects":false,"engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"build":"rimraf dist && tsc -p tsconfig.prod.json","test":"NODE_OPTIONS=--experimental-vm-modules jest --coverage","cz":"git-cz"},"repository":{"type":"git","url":"git+https://github.com/grantila/json-schema-cycles.git"},"keywords":["json","schema","jsonschema","cycles","cyclic","recursive"],"devDependencies":{"@babel/preset-env":"^7.15.6","@babel/preset-typescript":"^7.15.0","@types/jest":"^27.0.1","@types/node":"^16.9.1","cz-conventional-changelog":"^3.1.0","jest":"^27.2.0","rimraf":"^3.0.1","typescript":"^4.4.3"},"dependencies":{"graph-cycles":"^2.0.0","json-schema-traverse":"^1.0.0"},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"jest":{"testEnvironment":"node","coverageReporters":["lcov","text","html"],"extensionsToTreatAsEsm":[".ts"]},"gitHead":"7bf99cce2c9b4eea459aed3bd9cd2eaefae7e8a3","_id":"json-schema-cycles@2.0.0","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-dv6bUaLR4j+Kqob/27Zd3NIv7i0m/PUCbaYzCveBNXOENgRWYNZGzq5ko5DN4Fm2pPVNsEGhv02uF+WOxOVhZQ==","shasum":"563f0a788da422d9105b83ab5847f65bd08ff32c","tarball":"https://registry.npmjs.org/json-schema-cycles/-/json-schema-cycles-2.0.0.tgz","fileCount":5,"unpackedSize":11488,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2wvWCRA9TVsSAnZWagAAgrcP/RueSIM5r6ctV60td0dt\nMPRTYPwDcytC5wmsMGJA2B3TvGy88upmBa0dqavNQMzB4S0Iljh9jWdzGvKm\n0P/nfCQ1IJ1wZ5yeiVVNLUC2M6HKdx4QkdIEi/VPQ4DB1Ebe7fAib58tbFiu\nCC+UFzDJXIgrLaeZt/OFlIaM5D84noa26VwetJxdiZJLWf5yF1xYNpVfHnTf\nM3jzb9TxUaZUa3j6Gjf/6C00evdxqT7p+G3VqrSuas/6qf1oi3pmkuCI9xUF\ny+6WO0EMhcuZABKx5VdOIvrVgYRKo3brqHiCyPflCROVqFow+yjHFwR6fVsJ\nHs56Cg3H/bOh4md9C6w8mYIUA/DSalm9fyBY675uxoZyYyTfjWGG3EmShZ0u\nId6P1w5I7uIx5GbLt8cy96KxxpQH5vruIOpXNGPt5V57w2k4oDByv/Wni3ER\n5y11Slp7SgGX9yWHV5IPJNSTFHSnXuzJ2PNNM0yuI1fS5jymDOdmEtJhjlVP\nqXDYAJ/xNTSOrLbeT0W85/kXWrPwWdWmFOxcdwjvgPA45JydTdYIMaZD2Lze\ndqDRsBUZABggA1uj9EOFBu/oLL3UStihoLZQmY6Dg9cnV7jy1VDliFVpsES3\nauFYjDr5dLnOKJP8bIqzjt8JLr0rwEoOnakIUUNYQ8EIp2NWgIWwnHlG6JZc\n3Y7L\r\n=wBsV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTRSmTX8y3Nm6ZF0soniTv488i3n6GOvW7dfspIKaSoAIgINKNuaW+M6rN1ggyz5GbKVUxXncTzjp1ASCUK9lrSBc="}]},"_npmUser":{"name":"grantila","email":"g.rantila@gmail.com"},"directories":{},"maintainers":[{"name":"grantila","email":"g.rantila@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-schema-cycles_2.0.0_1633787451380_0.6254537543219854"},"_hasShrinkwrap":false},"3.0.0":{"name":"json-schema-cycles","version":"3.0.0","description":"Analyize recursive (cyclic) JSON Schema types","author":{"name":"Gustaf Räntilä"},"license":"MIT","bugs":{"url":"https://github.com/grantila/json-schema-cycles/issues"},"homepage":"https://github.com/grantila/json-schema-cycles#readme","main":"./dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","type":"module","sideEffects":false,"engines":{"node":"^14.13.1 || >=16.0.0"},"scripts":{"build":"rimraf dist && tsc -p tsconfig.prod.json","test":"NODE_OPTIONS=--experimental-vm-modules jest --coverage","cz":"git-cz"},"repository":{"type":"git","url":"git+https://github.com/grantila/json-schema-cycles.git"},"keywords":["json","schema","jsonschema","cycles","cyclic","recursive"],"devDependencies":{"@babel/preset-env":"^7.20.2","@babel/preset-typescript":"^7.18.6","@types/jest":"^29.4.0","@types/node":"^18.11.18","cz-conventional-changelog":"^3.3.0","jest":"^29.4.1","rimraf":"^4.1.2","typescript":"^4.9.5"},"dependencies":{"graph-cycles":"^3.0.0","json-schema-traverse":"^1.0.0"},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"jest":{"testEnvironment":"node","coverageReporters":["lcov","text","html"],"extensionsToTreatAsEsm":[".ts"]},"packageManager":"yarn@3.2.4","gitHead":"6c9d2ee764dcaff06a16b67b7b844f30b61638c1","_id":"json-schema-cycles@3.0.0","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-bhFjxBfSbwaBCQDFfUWxdt/yFVuPG+cIh2E1aNrK6+klDgSu6BKGnk0y+QjkZ1G03Gq7YUjmF26bnY9NFDGjvw==","shasum":"71d530e947311b6daa8f8ea4f154a11db94cb7ba","tarball":"https://registry.npmjs.org/json-schema-cycles/-/json-schema-cycles-3.0.0.tgz","fileCount":5,"unpackedSize":11277,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHHh0XDCBucSDKuBGgv2xAnYWx5ywH3jrn5WDdD5uBLzAiBByQlJrXK57mOpIw7q76XgOo9SV43lsHgs9gCeNUObjA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3DQoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpI4BAAjNKnOBJGGfxH6FqYnFUYW/lAcWTzKExXwaa2bgG90JQWbe8j\r\nXD/Mief5DdFvLJVIdyRN9MoP0MK2APxQ3uzU8OJtgji7QueJO8HyHrXWaEfD\r\nnYraYFAxvHgxcrs9CFgjsk29LvJ+S3+1suu52FhnMyAjZ/nByEbV2mGoLPZb\r\nWvvcb68IQy8/HyE3qHwKQygwW2jvX5XgrxYtQV9Z2+ZNX1A905rk/xgbo2O8\r\nXk6FZAl35tCZyN45SB6s9EL90+VUff6OyPELxIGPA60s/dZe2WxX9p0Lt6ui\r\nZpNtqIHUdv7YEdEjZzf/cXGPysLAkLUA0AHxkXnSTJZkpYgPPlQCl35c5LUr\r\nhEDhDmvpCTuZy93EhCyrd4YuDYPONfpoQCfLmfGoLkssiH3s1qaP6VsnsDWd\r\nCoMAYi4yVZTUkK/Oo1EGlWMR6hjXwVc/eVMF/AzlgmGgNVxv2LuX7CsMYVqC\r\n55VinB6qyhuxe1g+lIP2TN+ES+VQqfJZKQH5d5SZ6kuvJmQSRq13eBBBNY5j\r\ni+WCoA+Whh2+BCttpGhd4tmVtP4iNuk+OFXn59+jFHRIjQjbGUd1ZIx1xU60\r\n/QyZLpajjTaCiJIeUhGJVsLGi2K9Fa1TfI/+5tvkJrOqBe6uegK1Ani9cusD\r\nmol3ZWjTALmZbB73SOisetyfk4NaaCvtR08=\r\n=ukHU\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"grantila","email":"g.rantila@gmail.com"},"directories":{},"maintainers":[{"name":"grantila","email":"g.rantila@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-schema-cycles_3.0.0_1675375655941_0.0333014080987768"},"_hasShrinkwrap":false}},"time":{"created":"2021-04-01T23:44:21.835Z","1.0.0":"2021-04-01T23:44:21.981Z","modified":"2023-02-02T22:07:36.206Z","1.1.0":"2021-04-11T09:59:32.467Z","2.0.0":"2021-10-09T13:50:51.540Z","3.0.0":"2023-02-02T22:07:36.120Z"},"maintainers":[{"name":"grantila","email":"g.rantila@gmail.com"}],"description":"Analyize recursive (cyclic) JSON Schema types","homepage":"https://github.com/grantila/json-schema-cycles#readme","keywords":["json","schema","jsonschema","cycles","cyclic","recursive"],"repository":{"type":"git","url":"git+https://github.com/grantila/json-schema-cycles.git"},"author":{"name":"Gustaf Räntilä"},"bugs":{"url":"https://github.com/grantila/json-schema-cycles/issues"},"license":"MIT","readme":"[![npm version][npm-image]][npm-url]\n[![downloads][downloads-image]][npm-url]\n[![build status][build-image]][build-url]\n[![coverage status][coverage-image]][coverage-url]\n[![Node.JS version][node-version]][node-url]\n\n\n# json-schema-cycles\n\nDetect cyclic dependencies in a JSON schema (or more precisely a JSON schema with the `definitions` property for the individual type definitions). This package doesn't handle external references, you need to use a ref-parser and squash all types into one schema before using this package.\n\nThere are two types of analysis functions, `analyzeTypes` and `analyzeTypesFast`. The former provides a more in-depth analysis but can be slow on large input. If the input is extremely complex with massive cyclicity, it might even crash the process or run out of memory.\n\nUnless an in-depth analysis is necessary, choose the `analyzeTypesFast` function.\n\n\n## Versions\n\n * Since v2 this is a [pure ESM][pure-esm] package, and requires Node.js >=12.20. It cannot be used from CommonJS.\n\n\n## Example\n\n`analyzeTypes` takes a JSON schema object and returns a result object on the same format as [`FullAnalysisResult` in graph-cycles](https://github.com/grantila/graph-cycles/#full-analysis-mode) but with an additional `graph` property containing the type dependency graph as an array of `[ from: string, to: Array< string > ]` where `from` is the type and `to` is the dependent types.\n\n`analyzeTypesFast` also takes a JSON schema object, but returns an object on the same format as [`FastAnalysisResult` in graph-cycles](https://github.com/grantila/graph-cycles/#fast-analysis-mode), with the same additional `graph` property as from `analyzeTypes`.\n\n```ts\nimport { analyzeTypes, analyzeTypesFast } from 'json-schema-cycles'\n\nconst { cycles, entrypoints, dependencies, dependents, all, graph } = analyzeTypes( schemaObject );\n// or\nconst { cyclic, dependencies, dependents, graph } = analyzeTypesFast( schemaObject );\n```\n\nCheck [graph-cycles](https://github.com/grantila/graph-cycles) for an understanding of the result object, apart from `graph`.\n\n<details style=\"padding-left: 32px; border-left: 4px solid gray;\">\n<summary>Given the following JSON Schema:</summary>\n<p>\n\n```ts\nconst jsonSchema = {\n    definitions: {\n        Link: {}, // Non-cyclic but dependency of Message\n        Subscriber: {\n            type: 'object',\n            properties: {\n                user: { $ref: '#/definitions/User' },\n            },\n        },\n        Message: {\n            type: 'object',\n            properties: {\n                replyTo: { $ref: '#/definitions/Message' },\n                link: { $ref: '#/definitions/Link' },\n                subscriber: { $ref: '#/definitions/Subscriber' },\n            },\n        },\n        User: {\n            type: 'object',\n            properties: {\n                parent: { $ref: '#/definitions/User' },\n                lastMessage: { $ref: '#/definitions/Message' },\n            },\n        },\n        DM: {\n            type: 'object',\n            properties: {\n                lastUser: { $ref: '#/definitions/User' },\n            },\n        },\n        Actions: {\n            type: 'object',\n            properties: {\n                dms: {\n                    type: 'array',\n                    items: { $ref: '#/definitions/DM' },\n                },\n            },\n        },\n        // Has dependencies, but nothing cyclic\n        Product: {},\n        Cart: {\n            type: 'array',\n            items: { $ref: '#/definitions/Product' },\n        },\n    }\n};\n```\n\n</p>\n</details>\n\n... which can be viewed as:\n\n```\nCart -> Product\n                 __       ___\n                |  |     |   |\n                v  |     v   |\nAction -> DM -> User -> Message -> Link\n                  ^        |\n                  |        v\n                  `--- Subscriber\n\n```\n\nfor a full analysis, the result will be (of the type `TypeAnalysisFullResult`):\n\n```ts\n{\n    entrypoints: [\n        [ 'DM' ],\n        [ 'Actions', 'DM' ],\n    ],\n    cycles: [\n        [ 'User' ],\n        [ 'Message' ],\n        [ 'User', 'Message', 'Subscriber' ],\n    ],\n    all: [ 'User', 'Message', 'DM', 'Actions', 'Subscriber' ],\n    dependencies: [ 'Link' ],\n    dependents: [ ],\n    graph: [\n        [ 'Link', [ ] ],\n        [ 'Subscriber', [ 'User' ] ],\n        [ 'Message', [ 'Message', 'Link', 'Subscriber' ] ],\n        [ 'User', [ 'Message', 'User' ] ],\n        [ 'DM', [ 'User' ] ],\n        [ 'Actions', [ 'DM' ] ],\n        [ 'Product', [ ] ],\n        [ 'Cart', [ 'Product' ] ],\n    ],\n}\n```\n\nfor a fast analysis, the result will be (of the type `TypeAnalysisFastResult`):\n\n```ts\n{\n    cyclic: [ 'User', 'Message', 'DM', 'Actions', 'Subscriber' ],\n    dependencies: [ 'Link' ],\n    dependents: [ ],\n    graph: [\n        [ 'Link', [ ] ],\n        [ 'Subscriber', [ 'User' ] ],\n        [ 'Message', [ 'Message', 'Link', 'Subscriber' ] ],\n        [ 'User', [ 'Message', 'User' ] ],\n        [ 'DM', [ 'User' ] ],\n        [ 'Actions', [ 'DM' ] ],\n        [ 'Product', [ ] ],\n        [ 'Cart', [ 'Product' ] ],\n    ],\n}\n```\n\n\n## Helpers\n\nTwo helper functions are exported; `sortTypeAnalysisFullResult` and `sortTypeAnalysisFastResult`. They take an analysis result (of type `TypeAnalysisFullResult` or `TypeAnalysisFastResult`) and return a new object of the same type, with all fields sorted in a deterministic way, which is useful in tests.\n\n\n\n[npm-image]: https://img.shields.io/npm/v/json-schema-cycles.svg\n[npm-url]: https://npmjs.org/package/json-schema-cycles\n[downloads-image]: https://img.shields.io/npm/dm/json-schema-cycles.svg\n[build-image]: https://img.shields.io/github/actions/workflow/status/grantila/json-schema-cycles/master.yml?branch=master\n[build-url]: https://github.com/grantila/json-schema-cycles/actions?query=workflow%3AMaster\n[coverage-image]: https://coveralls.io/repos/github/grantila/json-schema-cycles/badge.svg?branch=master\n[coverage-url]: https://coveralls.io/github/grantila/json-schema-cycles?branch=master\n[node-version]: https://img.shields.io/node/v/json-schema-cycles\n[node-url]: https://nodejs.org/en/\n[pure-esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n","readmeFilename":"README.md"}