{"_id":"remark-flexible-toc","_rev":"11-d059ca7f92edefd1bb58eac17b5b2cf9","name":"remark-flexible-toc","dist-tags":{"latest":"1.2.7"},"versions":{"1.0.0":{"name":"remark-flexible-toc","version":"1.0.0","keywords":["unified","mdast","remark","markdown","MDX","plugin","remark-plugin","TOC","table of contents","remark-toc","remark-flexible-toc"],"author":{"name":"ipikuka","email":"talatkuyuk@gmail.com"},"license":"MIT","_id":"remark-flexible-toc@1.0.0","maintainers":[{"name":"talatkuyuk","email":"talatkuyuk@gmail.com"}],"homepage":"https://github.com/ipikuka/remark-flexible-toc#readme","bugs":{"url":"https://github.com/ipikuka/remark-flexible-toc/issues"},"dist":{"shasum":"2f2a92ff80ac87510038ccf7d137d9b6b0ef6a30","tarball":"https://registry.npmjs.org/remark-flexible-toc/-/remark-flexible-toc-1.0.0.tgz","fileCount":7,"integrity":"sha512-bp2OeEVzpjYrz3LpUFTjfUDldpcMkNmfgJBYcJ66B6AKa4hTyvTidfI6g4ZmpSazxkuUXeg9LXFlAkUsIGNuFw==","signatures":[{"sig":"MEQCIBWbG3uOAaUq+m/hek+QT0YNz0oO1b0XhJa+VK9H20mHAiAirfp3nujamArH1BEZz2iSk7no/MfjQmatPRkhsTEdJA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32257},"main":"./dist/esm/index.js","type":"module","types":"./dist/esm/index.d.ts","exports":"./dist/esm/index.js","gitHead":"9eec55a5dcbc73bfd8d84a24e94041b55cee0491","scripts":{"lint":"eslint .","test":"vitest","build":"npm run prebuild && tsc","prepack":"npm run build","test:ci":"vitest --watch=false","prebuild":"rimraf dist","prettier":"prettier --write .","test:file":"vitest without_options.spec.ts","prepublishOnly":"npm run test:ci && npm run prettier && npm run lint"},"_npmUser":{"name":"talatkuyuk","email":"talatkuyuk@gmail.com"},"repository":{"url":"git+https://github.com/ipikuka/remark-flexible-toc.git","type":"git"},"_npmVersion":"8.19.4","description":"Remark plugin to expose the table of contents via Vfile.data or via an option reference","directories":{},"sideEffects":false,"_nodeVersion":"16.20.2","dependencies":{"@types/mdast":"^4.0.0","github-slugger":"^2.0.0","unist-util-visit":"^5.0.0","mdast-util-to-string":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"dedent":"^0.7.0","eslint":"^8.56.0","rimraf":"^5.0.5","vitest":"^1.3.0","unified":"^11.0.4","prettier":"^3.1.1","remark-gfm":"^4.0.0","typescript":"^5.3.3","@types/node":"^20.10.5","remark-parse":"^11.0.0","@types/dedent":"^0.7.2","rehype-format":"^5.0.0","remark-rehype":"^11.0.0","rehype-stringify":"^10.0.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.2","@typescript-eslint/parser":"^6.16.0","@typescript-eslint/eslint-plugin":"^6.16.0"},"_npmOperationalInternal":{"tmp":"tmp/remark-flexible-toc_1.0.0_1708337121909_0.29973599889100155","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"remark-flexible-toc","version":"1.1.0","keywords":["unified","mdast","remark","markdown","MDX","plugin","remark-plugin","TOC","table of contents","remark-toc","remark-flexible-toc"],"author":{"name":"ipikuka","email":"talatkuyuk@gmail.com"},"license":"MIT","_id":"remark-flexible-toc@1.1.0","maintainers":[{"name":"talatkuyuk","email":"talatkuyuk@gmail.com"}],"homepage":"https://github.com/ipikuka/remark-flexible-toc#readme","bugs":{"url":"https://github.com/ipikuka/remark-flexible-toc/issues"},"dist":{"shasum":"f72e836db1a099fdc04c63de2663cfe0257a12a8","tarball":"https://registry.npmjs.org/remark-flexible-toc/-/remark-flexible-toc-1.1.0.tgz","fileCount":7,"integrity":"sha512-wz3Ydo2OMzX70GMZQorvJ/+0yHGqkzD7Kk8+zwXPy22nyZIUJhntAIufxupDgq/vsb094NX0wpYpsUNqYG0FwQ==","signatures":[{"sig":"MEQCIGjm8IKlzYVqR8WXus+XStW7AwbBXho6ngKxMzG6Zqb3AiB9H+s0t+WJJfB+gHXbaGe8Hn82X3KaqOmMFCumu5KB4g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/remark-flexible-toc@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":34479},"main":"./dist/esm/index.js","type":"module","types":"./dist/esm/index.d.ts","exports":"./dist/esm/index.js","gitHead":"525099ccdf5417498b132d8509e66687096adea0","scripts":{"lint":"eslint .","test":"vitest --watch=false","build":"rimraf dist && tsc --build && type-coverage","format":"npm run prettier && npm run lint","prepack":"npm run build","prettier":"prettier --write .","test:file":"vitest without_options.spec.ts","test:watch":"vitest","test-coverage":"vitest run --coverage","prepublishOnly":"npm run test && npm run format && npm run test-coverage"},"_npmUser":{"name":"talatkuyuk","email":"talatkuyuk@gmail.com"},"repository":{"url":"git+https://github.com/ipikuka/remark-flexible-toc.git","type":"git"},"_npmVersion":"10.2.4","description":"Remark plugin to expose the table of contents via Vfile.data or via an option reference","directories":{},"sideEffects":false,"_nodeVersion":"20.11.1","dependencies":{"@types/mdast":"^4.0.3","github-slugger":"^2.0.0","unist-util-visit":"^5.0.0","mdast-util-to-string":"^4.0.0"},"typeCoverage":{"detail":true,"strict":true,"atLeast":100,"ignoreCatch":true,"ignoreAsAssertion":true},"_hasShrinkwrap":false,"devDependencies":{"dedent":"^1.5.1","eslint":"^8.57.0","rimraf":"^5.0.5","vitest":"^1.4.0","unified":"^11.0.4","prettier":"^3.2.5","remark-gfm":"^4.0.0","typescript":"^5.4.3","@types/node":"^20.11.30","remark-parse":"^11.0.0","@types/dedent":"^0.7.2","rehype-format":"^5.0.0","remark-rehype":"^11.1.0","type-coverage":"^2.27.1","rehype-stringify":"^10.0.0","remark-heading-id":"^1.0.1","@vitest/coverage-v8":"^1.4.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","@types/remark-heading-id":"^1.0.0","@typescript-eslint/parser":"^7.3.1","@typescript-eslint/eslint-plugin":"^7.3.1"},"_npmOperationalInternal":{"tmp":"tmp/remark-flexible-toc_1.1.0_1711194571057_0.4236647900811257","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"remark-flexible-toc","version":"1.1.1","keywords":["unified","mdast","remark","markdown","MDX","plugin","remark-plugin","TOC","table of contents","remark-toc","remark-flexible-toc"],"author":{"name":"ipikuka","email":"talatkuyuk@gmail.com"},"license":"MIT","_id":"remark-flexible-toc@1.1.1","homepage":"https://github.com/ipikuka/remark-flexible-toc#readme","bugs":{"url":"https://github.com/ipikuka/remark-flexible-toc/issues"},"dist":{"shasum":"cb74ab6cca6f82ba17647f60f3df9b0bfa4ebdf5","tarball":"https://registry.npmjs.org/remark-flexible-toc/-/remark-flexible-toc-1.1.1.tgz","fileCount":7,"integrity":"sha512-aOmKELS8EtHXRnaqr9oNVyL/v+Ki4uKSOZJR5nniFDW/Pamv0wYmPSKuITI8vYmKGlHPV3wL9Sexxs5aD/PP5A==","signatures":[{"sig":"MEUCIDYPoL7W31YsOKT3ea5pQpwtsOg/UXTwdiYc3qFBVCcCAiEAnjzgQT/IIwiZ9eY7iUOopLIrQKNrXChJDsq7/X+QVXM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/remark-flexible-toc@1.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":34671},"main":"./dist/esm/index.js","type":"module","types":"./dist/esm/index.d.ts","exports":"./dist/esm/index.js","gitHead":"23ec2bea3e34d41ed92ec6ae77ad2cdd264e804a","scripts":{"lint":"eslint .","test":"vitest --watch=false","build":"rimraf dist && tsc --build && type-coverage","format":"npm run prettier && npm run lint","prepack":"npm run build","prettier":"prettier --write .","test:file":"vitest without_options.spec.ts","test:watch":"vitest","test-coverage":"vitest run --coverage","prepublishOnly":"npm run test && npm run format && npm run test-coverage"},"_npmUser":{"name":"talatkuyuk","email":"talatkuyuk@gmail.com"},"repository":{"url":"git+https://github.com/ipikuka/remark-flexible-toc.git","type":"git"},"_npmVersion":"10.7.0","description":"Remark plugin to expose the table of contents via Vfile.data or via an option reference","directories":{},"sideEffects":false,"_nodeVersion":"20.14.0","dependencies":{"unified":"^11.0.5","@types/mdast":"^4.0.4","github-slugger":"^2.0.0","unist-util-visit":"^5.0.0","mdast-util-to-string":"^4.0.0"},"typeCoverage":{"detail":true,"strict":true,"atLeast":100,"ignoreCatch":true,"ignoreAsAssertion":true},"_hasShrinkwrap":false,"devDependencies":{"dedent":"^1.5.3","eslint":"^8.57.0","rimraf":"^5.0.7","vitest":"^1.4.0","prettier":"^3.3.2","remark-gfm":"^4.0.0","typescript":"^5.5","@types/node":"^20.14.8","remark-parse":"^11.0.0","@types/dedent":"^0.7.2","rehype-format":"^5.0.0","remark-rehype":"^11.1.0","type-coverage":"^2.29.0","rehype-stringify":"^10.0.0","remark-heading-id":"^1.0.1","@vitest/coverage-v8":"^1.6.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","@types/remark-heading-id":"^1.0.0","@typescript-eslint/parser":"^7.13.1","@typescript-eslint/eslint-plugin":"^7.13.1"},"_npmOperationalInternal":{"tmp":"tmp/remark-flexible-toc_1.1.1_1719161651375_0.8625328260722713","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"remark-flexible-toc","version":"1.2.0","keywords":["unified","mdast","remark","markdown","MDX","plugin","remark plugin","TOC","table of contents","remark toc","remark flexible toc"],"author":{"name":"ipikuka","email":"talatkuyuk@gmail.com"},"license":"MIT","_id":"remark-flexible-toc@1.2.0","maintainers":[{"name":"talatkuyuk","email":"talatkuyuk@gmail.com"}],"homepage":"https://github.com/ipikuka/remark-flexible-toc#readme","bugs":{"url":"https://github.com/ipikuka/remark-flexible-toc/issues"},"dist":{"shasum":"5d9c66ebd6af0a77090c20d60780394fdc86b4e6","tarball":"https://registry.npmjs.org/remark-flexible-toc/-/remark-flexible-toc-1.2.0.tgz","fileCount":8,"integrity":"sha512-EqUIcYL5GRLzzrdXnwaGdvFqSxbQ9l08d+QQE6Jw4vCuKwADMzM0t9qXb32p0G28X57lZryBAgSPDBnEDePcOg==","signatures":[{"sig":"MEUCIA0X73FV4atLkY+D6U1/vscL7S7Bzbz71DLhGI8zKGKLAiEA663hZUwNN+q+jV4zQeSn9cgAniedruRHVLsQBmGTD/E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/remark-flexible-toc@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":35973},"main":"./dist/esm/index.js","type":"module","types":"./dist/esm/index.d.ts","exports":"./dist/esm/index.js","gitHead":"22713c51c5e922c19a84a4f49718ea28f0621d96","scripts":{"lint":"eslint .","test":"vitest --watch=false","build":"rimraf dist && tsc --build && type-coverage","format":"npm run prettier && npm run lint","prepack":"npm run build","prettier":"prettier --write .","test:file":"vitest without_options.spec.ts","test:watch":"vitest","test-coverage":"vitest run --coverage","prepublishOnly":"npm run test && npm run format && npm run test-coverage"},"_npmUser":{"name":"talatkuyuk","email":"talatkuyuk@gmail.com"},"repository":{"url":"git+https://github.com/ipikuka/remark-flexible-toc.git","type":"git"},"_npmVersion":"10.8.2","description":"Remark plugin to expose the table of contents via Vfile.data or via an option reference","directories":{},"sideEffects":false,"_nodeVersion":"20.19.1","dependencies":{"@types/mdast":"^4.0.4","github-slugger":"^2.0.0","unist-util-visit":"^5.0.0","mdast-util-to-string":"^4.0.0"},"typeCoverage":{"detail":true,"strict":true,"atLeast":100,"ignoreCatch":true,"ignoreAsAssertion":true},"_hasShrinkwrap":false,"devDependencies":{"dedent":"^1.6.0","eslint":"^9.28.0","rimraf":"^5.0.10","vitest":"^3.2.1","globals":"^16.2.0","unified":"^11.0.5","prettier":"^3.5.3","@eslint/js":"^9.28.0","remark-gfm":"^4.0.1","typescript":"^5.8.3","@types/node":"^22.15.29","remark-parse":"^11.0.0","rehype-format":"^5.0.1","remark-rehype":"^11.1.2","type-coverage":"^2.29.7","rehype-stringify":"^10.0.1","remark-heading-id":"^1.0.1","typescript-eslint":"^8.33.1","@vitest/coverage-v8":"^3.2.1","@vitest/eslint-plugin":"^1.2.1","eslint-config-prettier":"^10.1.5","eslint-plugin-prettier":"^5.4.1","@types/remark-heading-id":"^1.0.0"},"peerDependencies":{"unified":"^11"},"_npmOperationalInternal":{"tmp":"tmp/remark-flexible-toc_1.2.0_1749126208902_0.6518343219489844","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"remark-flexible-toc","version":"1.2.1","keywords":["unified","mdast","remark","markdown","MDX","plugin","remark plugin","TOC","table of contents","remark toc","remark flexible toc"],"author":{"name":"ipikuka","email":"talatkuyuk@gmail.com"},"license":"MIT","_id":"remark-flexible-toc@1.2.1","maintainers":[{"name":"talatkuyuk","email":"talatkuyuk@gmail.com"}],"homepage":"https://github.com/ipikuka/remark-flexible-toc#readme","bugs":{"url":"https://github.com/ipikuka/remark-flexible-toc/issues"},"dist":{"shasum":"f2414073475af37f30ce557458ff09e3e2887c9b","tarball":"https://registry.npmjs.org/remark-flexible-toc/-/remark-flexible-toc-1.2.1.tgz","fileCount":8,"integrity":"sha512-0/xmniPRYL/rmPFbOwU5di8zHNH19Vlv+sJUGQAvJYHcLFdC5e7F5tJ+CI3bRoS/sU6QtSqc4pPYtKmRaM4jLw==","signatures":[{"sig":"MEYCIQCb5XVRISdsj6SpvmtNNfvVotxoac/bTQgoFc6J2xYXagIhAP2OF374gu1KuWlJYxMlNY3UNkrbcNaSHtnBkBV3xcw0","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/remark-flexible-toc@1.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":35939},"main":"./dist/esm/index.js","type":"module","types":"./dist/esm/index.d.ts","exports":"./dist/esm/index.js","gitHead":"46f782efa813bd4a1a9a0d6577ecf238f99bed22","scripts":{"lint":"eslint .","test":"vitest --watch=false","build":"rimraf dist && tsc --build && type-coverage","format":"npm run prettier && npm run lint","prepack":"npm run build","prettier":"prettier --write .","test:file":"vitest without_options.spec.ts","test:watch":"vitest","test-coverage":"vitest run --coverage","prepublishOnly":"npm run test && npm run format && npm run test-coverage"},"_npmUser":{"name":"talatkuyuk","email":"talatkuyuk@gmail.com"},"repository":{"url":"git+https://github.com/ipikuka/remark-flexible-toc.git","type":"git"},"_npmVersion":"10.8.2","description":"Remark plugin to expose the table of contents via Vfile.data or via an option reference","directories":{},"sideEffects":false,"_nodeVersion":"20.19.5","dependencies":{"@types/mdast":"^4.0.4","github-slugger":"^2.0.0","unist-util-visit":"^5.0.0","mdast-util-to-string":"^4.0.0"},"typeCoverage":{"detail":true,"strict":true,"atLeast":100,"ignoreCatch":true,"ignoreAsAssertion":true},"_hasShrinkwrap":false,"devDependencies":{"dedent":"^1.7.0","eslint":"^9.35.0","rimraf":"^6.0.1","vitest":"^3.2.4","globals":"^16.3.0","unified":"^11.0.5","prettier":"^3.6.2","@eslint/js":"^9.35.0","remark-gfm":"^4.0.1","typescript":"^5.9.2","@types/node":"^24.3.1","remark-parse":"^11.0.0","rehype-format":"^5.0.1","remark-rehype":"^11.1.2","type-coverage":"^2.29.7","rehype-stringify":"^10.0.1","remark-heading-id":"^1.0.1","typescript-eslint":"^8.43.0","@vitest/coverage-v8":"^3.2.4","@vitest/eslint-plugin":"^1.3.9","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","@types/remark-heading-id":"^1.0.0"},"peerDependencies":{"unified":"^11"},"_npmOperationalInternal":{"tmp":"tmp/remark-flexible-toc_1.2.1_1757444017418_0.17144241857701137","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"remark-flexible-toc","version":"1.2.2","keywords":["unified","mdast","remark","markdown","MDX","plugin","remark plugin","TOC","table of contents","remark toc","remark flexible toc"],"author":{"name":"ipikuka","email":"talatkuyuk@gmail.com"},"license":"MIT","_id":"remark-flexible-toc@1.2.2","maintainers":[{"name":"talatkuyuk","email":"talatkuyuk@gmail.com"}],"homepage":"https://github.com/ipikuka/remark-flexible-toc#readme","bugs":{"url":"https://github.com/ipikuka/remark-flexible-toc/issues"},"dist":{"shasum":"9f5258efbf11dd21d14c411a84ec0b1afd2c2709","tarball":"https://registry.npmjs.org/remark-flexible-toc/-/remark-flexible-toc-1.2.2.tgz","fileCount":8,"integrity":"sha512-ZTQI8BPy6jsKpVHRmzTpAbDW2wvTfMWqmcvhleJJVI5jlWwapV+Qk+kKJEfehX3Q8wcEzD5iiD195t7Cl0yX2w==","signatures":[{"sig":"MEUCIHFGqo7XqhZP1w2VEwBe8/KvCiCJoE3HYGLBdx3gkeF4AiEAuGAXhRy4IyiEGenk3y8k/L8Rrtd77MlkT2mRq5BpJkk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/remark-flexible-toc@1.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":36462},"main":"./dist/esm/index.js","type":"module","types":"./dist/esm/index.d.ts","exports":"./dist/esm/index.js","gitHead":"b5c86d8b3a7e5c5377b96213bf48dd4e8e8d2795","scripts":{"lint":"eslint .","test":"vitest --watch=false","build":"rimraf dist && tsc --build && type-coverage","format":"npm run prettier && npm run lint","prepack":"npm run build","prettier":"prettier --write .","test:file":"vitest without_options.spec.ts","test:watch":"vitest","test-coverage":"vitest run --coverage","prepublishOnly":"npm run test && npm run format && npm run test-coverage"},"_npmUser":{"name":"talatkuyuk","email":"talatkuyuk@gmail.com"},"repository":{"url":"git+https://github.com/ipikuka/remark-flexible-toc.git","type":"git"},"_npmVersion":"10.8.2","description":"Remark plugin to expose the table of contents via Vfile.data or via an option reference","directories":{},"sideEffects":false,"_nodeVersion":"20.19.5","dependencies":{"@types/mdast":"^4.0.4","github-slugger":"^2.0.0","unist-util-visit":"^5.0.0","mdast-util-to-string":"^4.0.0"},"typeCoverage":{"detail":true,"strict":true,"atLeast":100,"ignoreCatch":true,"ignoreAsAssertion":true},"_hasShrinkwrap":false,"devDependencies":{"dedent":"^1.7.0","eslint":"^9.35.0","rimraf":"^6.0.1","vitest":"^3.2.4","globals":"^16.3.0","unified":"^11.0.5","prettier":"^3.6.2","@eslint/js":"^9.35.0","remark-gfm":"^4.0.1","typescript":"^5.9.2","@types/node":"^24.3.1","remark-parse":"^11.0.0","rehype-format":"^5.0.1","remark-rehype":"^11.1.2","type-coverage":"^2.29.7","rehype-stringify":"^10.0.1","remark-heading-id":"^1.0.1","typescript-eslint":"^8.43.0","@vitest/coverage-v8":"^3.2.4","@vitest/eslint-plugin":"^1.3.9","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","@types/remark-heading-id":"^1.0.0"},"peerDependencies":{"unified":"^11"},"_npmOperationalInternal":{"tmp":"tmp/remark-flexible-toc_1.2.2_1759737405480_0.9406356853083881","host":"s3://npm-registry-packages-npm-production"}},"1.2.3":{"name":"remark-flexible-toc","version":"1.2.3","keywords":["unified","mdast","remark","markdown","MDX","plugin","remark plugin","TOC","table of contents","remark toc","remark flexible toc"],"author":{"name":"ipikuka","email":"talatkuyuk@gmail.com"},"license":"MIT","_id":"remark-flexible-toc@1.2.3","maintainers":[{"name":"talatkuyuk","email":"talatkuyuk@gmail.com"}],"homepage":"https://github.com/ipikuka/remark-flexible-toc#readme","bugs":{"url":"https://github.com/ipikuka/remark-flexible-toc/issues"},"dist":{"shasum":"0a16827ba2f546b6124e41b0c4619b223753175a","tarball":"https://registry.npmjs.org/remark-flexible-toc/-/remark-flexible-toc-1.2.3.tgz","fileCount":8,"integrity":"sha512-GA9+wUpFRXZ5Hh6xsEyZc1+E1lD8DgQS3CHn2qJNbB3M/zlPUgSvNp7+SagdYsWwW8MwaVZc4XjFuo6pcJdYjw==","signatures":[{"sig":"MEUCIQCZlfd2y4etSatDLVix4hHfryJdMKVem3LJ4yhjcex1iQIgfTL7M9ZxfzEvf5FdO64c2dPDJg+W4RJe8pRAAxSg7jE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/remark-flexible-toc@1.2.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":36417},"main":"./dist/esm/index.js","type":"module","types":"./dist/esm/index.d.ts","exports":"./dist/esm/index.js","gitHead":"975dc61973007c18c7142a0a2c237675a4f39a35","scripts":{"lint":"eslint .","test":"vitest --watch=false","build":"rimraf dist && tsc --build && type-coverage","format":"npm run prettier && npm run lint","prepack":"npm run build","prettier":"prettier --write .","test:file":"vitest without_options.spec.ts","test:watch":"vitest","test-coverage":"vitest run --coverage","prepublishOnly":"npm run test && npm run format && npm run test-coverage"},"_npmUser":{"name":"talatkuyuk","email":"talatkuyuk@gmail.com"},"repository":{"url":"git+https://github.com/ipikuka/remark-flexible-toc.git","type":"git"},"_npmVersion":"10.8.2","description":"Remark plugin to expose the table of contents via Vfile.data or via an option reference","directories":{},"sideEffects":false,"_nodeVersion":"20.19.5","dependencies":{"@types/mdast":"^4.0.4","github-slugger":"^2.0.0","unist-util-visit":"^5.0.0","mdast-util-to-string":"^4.0.0"},"typeCoverage":{"detail":true,"strict":true,"atLeast":100,"ignoreCatch":true,"ignoreAsAssertion":true},"_hasShrinkwrap":false,"devDependencies":{"dedent":"^1.7.0","eslint":"^9.37.0","rimraf":"^6.0.1","vitest":"^3.2.4","globals":"^16.4.0","unified":"^11.0.5","prettier":"^3.6.2","@eslint/js":"^9.37.0","remark-gfm":"^4.0.1","typescript":"^5.9.3","@types/node":"^24.7.0","remark-parse":"^11.0.0","rehype-format":"^5.0.1","remark-rehype":"^11.1.2","type-coverage":"^2.29.7","rehype-stringify":"^10.0.1","remark-heading-id":"^1.0.1","typescript-eslint":"^8.46.0","@vitest/coverage-v8":"^3.2.4","@vitest/eslint-plugin":"^1.3.16","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","@types/remark-heading-id":"^1.0.0"},"peerDependencies":{"unified":"^11"},"_npmOperationalInternal":{"tmp":"tmp/remark-flexible-toc_1.2.3_1759772033433_0.6590950947101184","host":"s3://npm-registry-packages-npm-production"}},"1.2.4":{"name":"remark-flexible-toc","version":"1.2.4","keywords":["unified","mdast","remark","markdown","MDX","plugin","remark plugin","TOC","table of contents","remark toc","remark flexible toc"],"author":{"name":"ipikuka","email":"talatkuyuk@gmail.com"},"license":"MIT","_id":"remark-flexible-toc@1.2.4","maintainers":[{"name":"talatkuyuk","email":"talatkuyuk@gmail.com"}],"homepage":"https://github.com/ipikuka/remark-flexible-toc#readme","bugs":{"url":"https://github.com/ipikuka/remark-flexible-toc/issues"},"dist":{"shasum":"d2448ec62094f31e678037848e9f7746515b8d8a","tarball":"https://registry.npmjs.org/remark-flexible-toc/-/remark-flexible-toc-1.2.4.tgz","fileCount":8,"integrity":"sha512-vHQdchXWnPZ2/CQm5iS8Av+Qgi9IXDbhfTueys3h5KF6iNP8UG5qZwJmcrhUWiJcGiZQPZWpRpTIisBQ6gqixA==","signatures":[{"sig":"MEUCIQCKmIt0fOCfk+w5stROB2qN4sPravuv2Q28VbNqm+HdrwIgUvgv6yDH5hDgAyMLbb0kx3GLGQsX0aZAV+D9Tjy5e4s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/remark-flexible-toc@1.2.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":36798},"main":"./dist/esm/index.js","type":"module","types":"./dist/esm/index.d.ts","exports":"./dist/esm/index.js","gitHead":"7c90ad1089ba6bb6dd57b203af1d6d9e64d9825d","scripts":{"lint":"eslint .","test":"vitest --watch=false","build":"rimraf dist && tsc --build && type-coverage","format":"npm run prettier && npm run lint","prepack":"npm run build","prettier":"prettier --write .","test:file":"vitest without_options.spec.ts","test:watch":"vitest","test-coverage":"vitest run --coverage","prepublishOnly":"npm run test && npm run format && npm run test-coverage"},"_npmUser":{"name":"talatkuyuk","email":"talatkuyuk@gmail.com"},"repository":{"url":"git+https://github.com/ipikuka/remark-flexible-toc.git","type":"git"},"_npmVersion":"10.8.2","description":"Remark plugin to expose the table of contents via Vfile.data or via an option reference","directories":{},"sideEffects":false,"_nodeVersion":"20.19.5","dependencies":{"@types/mdast":"^4.0.4","github-slugger":"^2.0.0","unist-util-visit":"^5.0.0","mdast-util-to-string":"^4.0.0"},"typeCoverage":{"detail":true,"strict":true,"atLeast":100,"ignoreCatch":true,"ignoreAsAssertion":true},"_hasShrinkwrap":false,"devDependencies":{"dedent":"^1.7.0","eslint":"^9.39.1","rimraf":"^6.1.0","vitest":"^4.0.6","globals":"^16.5.0","unified":"^11.0.5","prettier":"^3.6.2","@eslint/js":"^9.39.1","remark-gfm":"^4.0.1","typescript":"^5.9.3","@types/node":"^24.10.0","remark-parse":"^11.0.0","rehype-format":"^5.0.1","remark-rehype":"^11.1.2","type-coverage":"^2.29.7","rehype-stringify":"^10.0.1","remark-heading-id":"^1.0.1","typescript-eslint":"^8.46.3","@vitest/coverage-v8":"^4.0.6","@vitest/eslint-plugin":"^1.4.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","@types/remark-heading-id":"^1.0.0"},"peerDependencies":{"unified":"^11"},"_npmOperationalInternal":{"tmp":"tmp/remark-flexible-toc_1.2.4_1762280616057_0.5484020064338353","host":"s3://npm-registry-packages-npm-production"}},"1.2.5":{"name":"remark-flexible-toc","version":"1.2.5","keywords":["unified","mdast","remark","markdown","MDX","plugin","remark plugin","TOC","table of contents","remark toc","remark flexible toc"],"author":{"name":"ipikuka","email":"talatkuyuk@gmail.com"},"license":"MIT","_id":"remark-flexible-toc@1.2.5","maintainers":[{"name":"talatkuyuk","email":"talatkuyuk@gmail.com"}],"homepage":"https://github.com/ipikuka/remark-flexible-toc#readme","bugs":{"url":"https://github.com/ipikuka/remark-flexible-toc/issues"},"dist":{"shasum":"acb72b9bd751576f39a1b6243de4d40f61cae814","tarball":"https://registry.npmjs.org/remark-flexible-toc/-/remark-flexible-toc-1.2.5.tgz","fileCount":8,"integrity":"sha512-zlSVdTd21Ggw8E1u6fLP3CMynvOd19z8X//LW8jb9nyk5ei9fGkrn3Nnyy464DTPmolO2DrLT5fT3hNv9RjQhg==","signatures":[{"sig":"MEUCIFfm/zqRbntnoN4+5uQq8MA55xIZ82vnrDwEyt2E3ybjAiEAi/bLXctiilD6JxDcmmkgKswvqarej895171Zr2QpA5A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/remark-flexible-toc@1.2.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":39012},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"d53cd884d24fe2f85707d2ec1d29384e2c4be68d","scripts":{"lint":"eslint .","test":"vitest run","build":"rimraf dist && tsc --build && type-coverage","format":"npm run prettier && npm run lint","prepack":"npm run build","prettier":"prettier --write .","test:file":"vitest test.plugin.spec.ts","test:watch":"vitest","test-coverage":"vitest run --coverage","prepublishOnly":"npm run format && npm run test-coverage"},"_npmUser":{"name":"talatkuyuk","email":"talatkuyuk@gmail.com"},"repository":{"url":"git+https://github.com/ipikuka/remark-flexible-toc.git","type":"git"},"_npmVersion":"10.9.4","description":"Remark plugin to expose the table of contents via Vfile.data or via an option reference","directories":{},"sideEffects":false,"_nodeVersion":"22.22.0","dependencies":{"@types/mdast":"^4.0.4","github-slugger":"^2.0.0","unist-util-visit":"^5.1.0","mdast-util-to-string":"^4.0.0"},"typeCoverage":{"detail":true,"strict":true,"atLeast":100,"ignoreCatch":true,"ignoreAsAssertion":true},"_hasShrinkwrap":false,"devDependencies":{"dedent":"^1.7.1","eslint":"^10.0.0","rimraf":"^6.1.3","vitest":"^4.0.18","globals":"^17.3.0","unified":"^11.0.5","prettier":"^3.8.1","@eslint/js":"^10.0.1","remark-gfm":"^4.0.1","typescript":"^5.9.3","@types/node":"^24.10.13","remark-parse":"^11.0.0","rehype-format":"^5.0.1","remark-rehype":"^11.1.2","type-coverage":"^2.29.7","rehype-stringify":"^10.0.1","remark-heading-id":"^1.0.1","typescript-eslint":"^8.56.0","@vitest/coverage-v8":"^4.0.18","@vitest/eslint-plugin":"^1.6.9","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.5","@types/remark-heading-id":"^1.0.0"},"peerDependencies":{"unified":"^11"},"_npmOperationalInternal":{"tmp":"tmp/remark-flexible-toc_1.2.5_1771477108032_0.7823816088765647","host":"s3://npm-registry-packages-npm-production"}},"1.2.6":{"name":"remark-flexible-toc","version":"1.2.6","keywords":["unified","mdast","remark","markdown","MDX","plugin","remark plugin","TOC","table of contents","remark toc","remark flexible toc"],"author":{"name":"ipikuka","email":"talatkuyuk@gmail.com"},"license":"MIT","_id":"remark-flexible-toc@1.2.6","maintainers":[{"name":"talatkuyuk","email":"talatkuyuk@gmail.com"}],"homepage":"https://github.com/ipikuka/remark-flexible-toc#readme","bugs":{"url":"https://github.com/ipikuka/remark-flexible-toc/issues"},"dist":{"shasum":"368e497d684fd9af46fcea1b6d1f2943eb591375","tarball":"https://registry.npmjs.org/remark-flexible-toc/-/remark-flexible-toc-1.2.6.tgz","fileCount":7,"integrity":"sha512-DJ9PeUPswJPFoeV+GO15aSXLNRXgkNwYcCojCq+0D/L5N3+2zyrAahEmZuAQ9S73B8Qm1QLO/mRrwo+qFmr2og==","signatures":[{"sig":"MEYCIQC/GgpmzK1BoWd7O6Phi8GVSCnfOzSO5y6MOysS59g70gIhALSx4Bt291GvlVXSjPV/SMYB7u+TAZTjVNFsXCXybzxS","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/remark-flexible-toc@1.2.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":40259},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"87b0fc6980f0ff3569948db9ff2237ba65a6820e","scripts":{"lint":"eslint .","test":"vitest run","build":"rimraf dist && tsc --build tsconfig.build.json && type-coverage","format":"npm run prettier && npm run lint","prepack":"npm run build","prettier":"prettier --write .","test:file":"vitest test.plugin.spec.ts","test:watch":"vitest","test-coverage":"vitest run --coverage","prepublishOnly":"npm run format && npm run test-coverage"},"_npmUser":{"name":"talatkuyuk","email":"talatkuyuk@gmail.com"},"repository":{"url":"git+https://github.com/ipikuka/remark-flexible-toc.git","type":"git"},"_npmVersion":"10.9.8","description":"Remark plugin to expose the table of contents via Vfile.data or via an option reference","directories":{},"sideEffects":false,"_nodeVersion":"22.22.3","dependencies":{"@types/mdast":"^4.0.4","github-slugger":"^2.0.0","unist-util-visit":"^5.1.0","mdast-util-to-string":"^4.0.0"},"typeCoverage":{"detail":true,"strict":true,"atLeast":100,"ignoreCatch":true,"ignoreAsAssertion":true},"_hasShrinkwrap":false,"devDependencies":{"dedent":"^1.7.2","eslint":"^10.4.0","rimraf":"^6.1.3","vitest":"^4.1.7","globals":"^17.6.0","unified":"^11.0.5","prettier":"^3.8.3","@eslint/js":"^10.0.1","remark-gfm":"^4.0.1","typescript":"^5.9.3","@types/node":"^24.12.4","remark-parse":"^11.0.0","rehype-format":"^5.0.1","remark-rehype":"^11.1.2","type-coverage":"^2.29.7","rehype-stringify":"^10.0.1","typescript-eslint":"^8.60.0","@vitest/coverage-v8":"^4.1.7","@vitest/eslint-plugin":"^1.6.18","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.5","remark-custom-header-id":"^1.0.0"},"peerDependencies":{"unified":"^11"},"_npmOperationalInternal":{"tmp":"tmp/remark-flexible-toc_1.2.6_1779908446184_0.2928867573557026","host":"s3://npm-registry-packages-npm-production"}},"1.2.7":{"name":"remark-flexible-toc","version":"1.2.7","description":"Remark plugin to expose the table of contents via Vfile.data or via an option reference","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"build":"rimraf dist && tsc --build tsconfig.build.json && type-coverage","format":"npm run prettier && npm run lint","prettier":"prettier --write .","lint":"eslint .","test":"vitest run","test:watch":"vitest","test:file":"vitest test.plugin.spec.ts","test-coverage":"vitest run --coverage","prepack":"npm run build","prepublishOnly":"npm run format && npm run test-coverage"},"repository":{"type":"git","url":"git+https://github.com/ipikuka/remark-flexible-toc.git"},"keywords":["unified","mdast","remark","markdown","MDX","plugin","remark plugin","TOC","table of contents","remark toc","remark flexible toc"],"author":{"name":"ipikuka","email":"talatkuyuk@gmail.com"},"license":"MIT","homepage":"https://github.com/ipikuka/remark-flexible-toc#readme","bugs":{"url":"https://github.com/ipikuka/remark-flexible-toc/issues"},"devDependencies":{"@eslint/js":"^10.0.1","@types/node":"^26.2.0","@vitest/coverage-v8":"^4.1.11","@vitest/eslint-plugin":"^1.6.27","dedent":"^1.7.2","eslint":"^10.8.1","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.6","globals":"^17.11.0","prettier":"^3.9.6","rehype-format":"^5.0.1","rehype-stringify":"^10.0.1","remark-custom-header-id":"^1.0.0","remark-gfm":"^4.0.1","remark-parse":"^11.0.0","remark-rehype":"^11.1.2","rimraf":"^6.1.3","type-coverage":"^2.30.1","typescript":"^5.9.3","typescript-eslint":"^8.67.0","unified":"^11.0.5","vitest":"^4.1.11"},"dependencies":{"@types/mdast":"^4.0.4","github-slugger":"^2.0.0","mdast-util-to-string":"^4.0.0","unist-util-visit":"^5.1.0"},"peerDependencies":{"unified":"^11"},"sideEffects":false,"typeCoverage":{"atLeast":100,"detail":true,"ignoreAsAssertion":true,"ignoreCatch":true,"strict":true},"_id":"remark-flexible-toc@1.2.7","gitHead":"d04888766950db30576898a45829c5dedb856253","_nodeVersion":"22.23.2","_npmVersion":"10.9.8","dist":{"integrity":"sha512-ZtFQPR4B0CkVztjnaxlm4JCwrionOxR5Q2ulMiYeBuMTprZ+Zbk3S1omTpE07sZ+yrVHGVPl2HXGjpgm1C7fZg==","shasum":"a84ffc37e39cb2be060dff306f64ce8137a5f7e2","tarball":"https://registry.npmjs.org/remark-flexible-toc/-/remark-flexible-toc-1.2.7.tgz","fileCount":7,"unpackedSize":40530,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/remark-flexible-toc@1.2.7","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCz4xftg6WLzu28rBko7yX+idBem45okmhcwrUv/SQangIgKEVWkTE+u4KwS9sLMZA4fRaLlhRutAv2eg3X+xPbuZM="}]},"_npmUser":{"name":"talatkuyuk","email":"talatkuyuk@gmail.com"},"directories":{},"maintainers":[{"name":"talatkuyuk","email":"talatkuyuk@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/remark-flexible-toc_1.2.7_1787085304858_0.06546378738959513"},"_hasShrinkwrap":false}},"time":{"created":"2024-02-19T10:05:21.908Z","modified":"2026-08-18T20:35:05.338Z","1.0.0":"2024-02-19T10:05:22.069Z","1.1.0":"2024-03-23T11:49:31.204Z","1.1.1":"2024-06-23T16:54:11.569Z","1.2.0":"2025-06-05T12:23:29.075Z","1.2.1":"2025-09-09T18:53:37.610Z","1.2.2":"2025-10-06T07:56:45.676Z","1.2.3":"2025-10-06T17:33:53.635Z","1.2.4":"2025-11-04T18:23:36.233Z","1.2.5":"2026-02-19T04:58:28.177Z","1.2.6":"2026-05-27T19:00:46.355Z","1.2.7":"2026-08-18T20:35:04.999Z"},"bugs":{"url":"https://github.com/ipikuka/remark-flexible-toc/issues"},"author":{"name":"ipikuka","email":"talatkuyuk@gmail.com"},"license":"MIT","homepage":"https://github.com/ipikuka/remark-flexible-toc#readme","keywords":["unified","mdast","remark","markdown","MDX","plugin","remark plugin","TOC","table of contents","remark toc","remark flexible toc"],"repository":{"type":"git","url":"git+https://github.com/ipikuka/remark-flexible-toc.git"},"description":"Remark plugin to expose the table of contents via Vfile.data or via an option reference","maintainers":[{"name":"talatkuyuk","email":"talatkuyuk@gmail.com"}],"readme":"# remark-flexible-toc\n\n**A robust Next.js newsletter `Next.js Weekly` is sponsoring me** 💖\n[![NextjsWeekly banner](./assets/next-js-weekly.png)](https://nextjsweekly.com/)\n\n**An outstanding Git-based CMS `Outstatic` is also sponsoring me** 💖\n[![Outstatic banner](./assets/outstatic-banner-dark.jpg)](https://outstatic.com/?utm_source=github&utm_medium=readme&utm_campaign=next-mdx-remote-client)\n\nA warm thanks 🙌 to [@ErfanEbrahimnia](https://github.com/ErfanEbrahimnia), [@avitorio](https://github.com/avitorio), [@recepkyk](https://github.com/recepkyk), and [@LSeaburg](https://github.com/LSeaburg) for the [support](https://github.com/sponsors/ipikuka) 💖\n\n---\n\n[![npm version][badge-npm-version]][url-npm-package]\n[![npm downloads][badge-npm-download]][url-npm-package]\n[![publish to npm][badge-publish-to-npm]][url-publish-github-actions]\n[![code-coverage][badge-codecov]][url-codecov]\n[![type-coverage][badge-type-coverage]][url-github-package]\n[![typescript][badge-typescript]][url-typescript]\n[![license][badge-license]][url-license]\n\nThis package is a [**unified**][unified] ([**remark**][remark]) plugin **to expose the table of contents via `Vfile.data` or via an option reference in markdown.**\n\n[**unified**][unified] is a project that transforms content with abstract syntax trees (ASTs) using the new parser [**micromark**][micromark]. [**remark**][remark] adds support for markdown to unified. [**mdast**][mdast] is the Markdown Abstract Syntax Tree (AST) which is a specification for representing markdown in a syntax tree.\n\n**This plugin is a remark plugin that doesn't transform the MDAST but gets info from the MDAST.**\n\n## When should I use this?\n\n**`remark-flexible-toc`** is useful if you want to get the table of contents (TOC) from the markdown/MDX document. It exposes the table of contents (TOC) in two ways:\n+ by adding a `toc` object into `Vfile.data`\n+ by mutating a reference array if provided in the options\n\n## Installation\n\nThis package is suitable for ESM only. In Node.js (version 16+), install with npm:\n\n```bash\nnpm install remark-flexible-toc\n```\n\nor\n\n```bash\nyarn add remark-flexible-toc\n```\n\n## Usage\n\nSay we have the following file, `example.md`, which consists some headings.\n\n```markdown\n# The Main Heading\n\n## Section\n\n### Subheading 1\n\n### Subheading 2\n```\n\nSay `example.js` looks as followings *(two ways):*\n\n#### The first way of getting TOC via file.data\n\n```javascript\nimport { read } from \"to-vfile\";\nimport remark from \"remark\";\nimport gfm from \"remark-gfm\";\nimport remarkRehype from \"remark-rehype\";\nimport rehypeStringify from \"rehype-stringify\";\nimport remarkFlexibleToc from \"remark-flexible-toc\";\n\nmain();\n\nasync function main() {\n  const file = await remark()\n    .use(gfm)\n    .use(remarkFlexibleToc)\n    .use(remarkRehype)\n    .use(rehypeStringify)\n    .process(await read(\"example.md\"));\n\n  console.log(file.data.toc);\n}\n```\n\n#### The second way of getting TOC via a reference array in the options\n\n```javascript\nimport { read } from \"to-vfile\";\nimport remark from \"remark\";\nimport gfm from \"remark-gfm\";\nimport remarkRehype from \"remark-rehype\";\nimport rehypeStringify from \"rehype-stringify\";\nimport remarkFlexibleToc from \"remark-flexible-toc\";\n\nmain();\n\nasync function main() {\n  const toc = [];\n\n  const file = await remark()\n    .use(gfm)\n    .use(remarkFlexibleToc, {tocRef: toc})\n    .use(remarkRehype)\n    .use(rehypeStringify)\n    .process(await read(\"example.md\"));\n\n  console.log(toc);\n}\n```\n\nNow, running both `node example.js` you will see that the same table of contents (TOC) is logged in the console:\n\n```javascript\n[\n  {\n    depth: 2,\n    href: \"#section\",\n    numbering: [1, 1],\n    parent: \"root\",\n    value: \"Section\",\n  },\n  {\n    depth: 3,\n    href: \"#subheading-1\",\n    numbering: [1, 1, 1],\n    parent: \"root\",\n    value: \"Subheading 1\",\n  },\n  {\n    depth: 3,\n    href: \"#subheading-2\",\n    numbering: [1, 1, 2],\n    parent: \"root\",\n    value: \"Subheading 2\",\n  },\n]\n```\n\nWithout **`remark-flexible-toc`**, there wouldn't be any `toc` key in the `file.data`:\n\n## Options\n\nAll options are **optional**.\n\n```typescript\ntype HeadingParent =\n  | \"root\"\n  | \"blockquote\"\n  | \"footnoteDefinition\"\n  | \"listItem\"\n  | \"container\"\n  | \"mdxJsxFlowElement\";\n\ntype HeadingDepth = 1 | 2 | 3 | 4 | 5 | 6;\n\nuse(remarkFlexibleToc, {\n  tocName?: string; // default: \"toc\"\n  tocRef?: TocItem[]; // default: []\n  maxDepth?: HeadingDepth; // default: 6\n  skipLevels?: HeadingDepth[]; // default: [1]\n  skipParents?: Exclude<HeadingParent, \"root\">[]; // default: []\n  exclude?: string | string[];\n  prefix?: string;\n  callback?: (toc: TocItem[]) => undefined;\n} as FlexibleTocOptions);\n```\n\n#### `tocName`\n\nIt is a **string** option in which the table of contents (TOC) is placed in the `vfile.data`. \n\nBy default it is **`toc`**, meaningly the TOC is reachable via `vfile.data.toc`.\n\n```javascript\nuse(remarkFlexibleToc, {\n  tocName: \"headings\";\n});\n```\nNow, the TOC is accessable via `vfile.data.headings`.\n\n#### `tocRef`\n\nIt is an **array of reference** option for getting the table of contents (TOC), which is the second way of getting the TOC from **`remark-flexible-toc`**.\n\nThe reference array should be an empty array, if not, it is emptied by the plugin.\n\nIf you use _typescript_, the array reference should be `const toc: TocItem[] = []`.\n\n```javascript\nconst toc = [];\n\nuse(remarkFlexibleToc, {\n  tocRef: toc; // `remark-flexible-toc` mutates the array of reference\n});\n```\n\nNow, the TOC is accessable via `toc`.\n\n#### `maxDepth`\n\nIt is a **number** option for indicating the max heading depth to include in the TOC.\n\nBy default it is `6`. Meaningly, there is no restriction by default.\n\n```javascript\nuse(remarkFlexibleToc, {\n  maxDepth: 4;\n});\n```\n\nThe `maxDepth` option is inclusive: when set to 4, level fourth headings are included, but fifth and sixth level headings will be skipped.\n\n#### `skipLevels` \n\nIt is an **array** option to indicate the heading levels to be skipped. \n\nBy default it is `[1]` since the first level heading is not expected to be in the TOC.\n\n```javascript\nuse(remarkFlexibleToc, {\n  skipLevels: [1, 2, 4, 5, 6];\n});\n```\n\nNow, the TOC consists only the third level headings.\n\n#### `skipParents`\n\nBy default it is an empty array `[]`. The array may contain the parent values `blockquote`, `footnoteDefinition`, `listItem`, `container`, `mdxJsxFlowElement`.\n\n```javascript\nuse(remarkFlexibleToc, {\n  skipParents: [\"blockquote\"];\n});\n```\n\nNow, the headings in the `<blockquote>` will not be added into the TOC.\n\n#### `exclude`\n\nIt is a **string** or **string[]** option. The plugin wraps the string(s) in new RegExp('^(' + value + ')$', 'i'), so any heading matching this expression will not be present in the TOC. The RegExp checks exact (not contain) matching and case insensitive as you see.\n\nThe option has no default value.\n\n```javascript\nuse(remarkFlexibleToc, {\n  exclude: \"The Subheading\";\n});\n```\nNow, the heading \"The Subheading\" will not be included in to the TOC, but forexample \"The Subheading Something\" will be included.\n\n#### `prefix`\n\nIt is a **string** option to add a prefix to `href`s of the TOC items. It is useful for example when later going from markdown to HTML and sanitizing with `rehype-sanitize`.\n\nThe option has no default value.\n\n```javascript\nuse(remarkFlexibleToc, {\n  prefix: \"text-prefix-\";\n});\n```\nNow, all TOC items' `href`s will start with that prefix like `#text-prefix-the-subheading`.\n\n#### `callback`\n\nIt is a **callback function** `callback?: (toc: TocItem[]) => undefined;` which takes the TOC items as an argument and returns nothing. It is usefull for logging the TOC, forexample, or modifing the TOC. **It is allowed that the callback function is able to mutate the TOC items !**\n\nThe option has no default value.\n\n```javascript\nuse(remarkFlexibleToc, {\n  callback: (toc) => {\n    console.log(toc);\n  };\n});\n```\n\nNow, each time when you compile the source, the TOC will be logged into the console for debugging purpose.\n\n## A Table of Content (TOC) Item\n\n```typescript\ntype TocItem = {\n  value: string; // heading text\n  href: string; // produced uniquely by \"github-slugger\" using the value of the heading\n  depth: HeadingDepth; // 1 | 2 | 3 | 4 | 5 | 6\n  numbering: number[]; // explained below\n  parent: HeadingParent; // \"root\"| \"blockquote\" | \"footnoteDefinition\" | \"listItem\" | \"container\" | \"mdxJsxFlowElement\"\n  data?: Record<string, unknown>; // Other remark plugins may store custom data in \"node.data.hProperties\" like \"id\" etc.\n};\n```\n\n> [!NOTE]\n> If there is a remark plugin before **`remark-flexible-toc`** in the plugin chain like **`remark-heading-id`** or **`remark-custom-header-id`**, which provides custom id for headings, that custom id takes precedence for `href`.\n\n**`remark-flexible-toc`** uses **`github-slugger`** internally for producing unique links. Then, it is possible you to use [**rehype-slug**][rehype-slug] (forIDs on headings) and [**rehype-autolink-headings**][rehype-autolink-headings] (for anchors that link-to-self) because they use the same **`github-slugger`**.\n\nAs an example for the unique heading links (notice the same heading texts).\n\n```markdown\n# The Main Heading\n\n## Section\n\n### Subheading\n\n## Section\n      \n### Subheading\n```\n\nThe `github-slugger` produces unique links with using a counter mechanism internally, and the TOC item's `href`s is going to be unique.\n\n```javascript\n[\n  {\n    depth: 2,\n    href: \"#section\",\n    numbering: [1, 1],\n    parent: \"root\",\n    value: \"Section\",\n  },\n  {\n    depth: 3,\n    href: \"#subheading\",\n    numbering: [1, 1, 1],\n    parent: \"root\",\n    value: \"Subheading\",\n  },\n  {\n    depth: 2,\n    href: \"#section-1\",\n    numbering: [1, 2],\n    parent: \"root\",\n    value: \"Section\",\n  },\n  {\n    depth: 3,\n    href: \"#subheading-1\",\n    numbering: [1, 2, 1],\n    parent: \"root\",\n    value: \"Subheading\",\n  },\n]\n```\n\n## Numbering for Ordered Table of Contents (TOC)\n\n**`remark-flexible-toc`** produces always the `numbering` for TOC items in case you show the ordered TOC.\n\nThe **numbering** of a TOC item is an array of number. The numbers in the `numbering` corresponds the **level of the headers**. With that structure, you know which header is under which header.\n\n```js\n[1, 1]\n[1, 2]\n[1, 2, 1]\n[1, 2, 2]\n[1, 3]\n```\n\nThe first number of the `numbering` is related with the fist level headings.\nThe second number of the `numbering` is related with the second level headings.\nAnd so on...\n\nIf yo haven't included the first level header into the TOC, you can slice the `numbering` with `1` so as to second level headings starts with `1` and so on..\n\n```javascript\ntocItem.numbering.slice(1);\n```\n\nYou can join the `numbering` as you wish. It is up to you to combine the `numbering` with dot, or dash.\n\n```javascript\ntocItem.numbering.join(\".\");\ntocItem.numbering.join(\"-\");\n```\n\n## Syntax tree\n\nThis plugin does not modify the `mdast` (markdown abstract syntax tree), collects data from the `mdast` and adds information into the `vfile.data` if required.\n\n## Types\n\nThis package is fully typed with [TypeScript][url-typescript]. The plugin exports the types `FlexibleTocOptions`, `HeadingParent`, `HeadingDepth`, `TocItem`.\n\n## Compatibility\n\nThis plugin works with `unified` version 6+ and `remark` version 7+. It is compatible with `mdx` version 2+.\n\n## Security\n\nUse of **`remark-flexible-toc`** does not involve rehype (hast) or user content so there are no openings for cross-site scripting (XSS) attacks.\n\n## My Plugins\n\nI like to contribute the Unified / Remark / MDX ecosystem, so I recommend you to have a look my plugins.\n\n### Support My Work ([become a sponsor](https://github.com/sponsors/ipikuka) 🚀)\n\nIf you find **`remark-flexible-toc`** or any of my projects is useful and helpful, please consider supporting my work. Your sponsorship means a lot to me and keeps these projects alive and updated! 💖\n\nMy sponsors are going to be featured at the very top of the page and proudly displayed on my [Sponsor Wall](https://github.com/sponsors/ipikuka).\n\nThank you for supporting open source! 🙌\n\n### My Remark Plugins\n\n- [`remark-flexible-code-titles`](https://www.npmjs.com/package/remark-flexible-code-titles)\n  – Remark plugin to add titles or/and containers for the code blocks with customizable properties\n- [`remark-flexible-containers`](https://www.npmjs.com/package/remark-flexible-containers)\n  – Remark plugin to add custom containers with customizable properties in markdown\n- [`remark-ins`](https://www.npmjs.com/package/remark-ins)\n  – Remark plugin to add `ins` element in markdown\n- [`remark-flexible-paragraphs`](https://www.npmjs.com/package/remark-flexible-paragraphs)\n  – Remark plugin to add custom paragraphs with customizable properties in markdown\n- [`remark-flexible-markers`](https://www.npmjs.com/package/remark-flexible-markers)\n  – Remark plugin to add custom `mark` element with customizable properties in markdown\n- [`remark-flexible-toc`](https://www.npmjs.com/package/remark-flexible-toc)\n  – Remark plugin to expose the table of contents via `vfile.data` or via an option reference\n- [`remark-mdx-remove-esm`](https://www.npmjs.com/package/remark-mdx-remove-esm)\n  – Remark plugin to remove import and/or export statements (mdxjsEsm)\n- [`remark-mdx-remove-expressions`](https://www.npmjs.com/package/remark-mdx-remove-expressions)\n  – Remark plugin to remove MDX expressions within curlybraces {} in MDX content\n\n### My Rehype Plugins\n\n- [`rehype-pre-language`](https://www.npmjs.com/package/rehype-pre-language)\n  – Rehype plugin to add language information as a property to `pre` element\n- [`rehype-highlight-code-lines`](https://www.npmjs.com/package/rehype-highlight-code-lines)\n  – Rehype plugin to add line numbers to code blocks and allow highlighting of desired code lines\n- [`rehype-code-meta`](https://www.npmjs.com/package/rehype-code-meta)\n  – Rehype plugin to copy `code.data.meta` to `code.properties.metastring`\n- [`rehype-image-toolkit`](https://www.npmjs.com/package/rehype-image-toolkit)\n  – Rehype plugin to enhance Markdown image syntax `![]()` and Markdown/MDX media elements (`<img>`, `<audio>`, `<video>`) by auto-linking bracketed or parenthesized image URLs, wrapping them in `<figure>` with optional captions, unwrapping images/videos/audio from paragraph, parsing directives in title for styling and adding attributes, and dynamically converting images into `<video>` or `<audio>` elements based on file extension.\n\n### My Recma Plugins\n\n- [`recma-mdx-escape-missing-components`](https://www.npmjs.com/package/recma-mdx-escape-missing-components)\n  – Recma plugin to set the default value `() => null` for the Components in MDX in case of missing or not provided so as not to throw an error\n- [`recma-mdx-change-props`](https://www.npmjs.com/package/recma-mdx-change-props)\n  – Recma plugin to change the `props` parameter into the `_props` in the `function _createMdxContent(props) {/* */}` in the compiled source in order to be able to use `{props.foo}` like expressions. It is useful for the `next-mdx-remote` or `next-mdx-remote-client` users in `nextjs` applications.\n- [`recma-mdx-change-imports`](https://www.npmjs.com/package/recma-mdx-change-imports)\n  – Recma plugin to convert import declarations for assets and media with relative links into variable declarations with string URLs, enabling direct asset URL resolution in compiled MDX.\n- [`recma-mdx-import-media`](https://www.npmjs.com/package/recma-mdx-import-media)\n  – Recma plugin to turn media relative paths into import declarations for both markdown and html syntax in MDX.\n- [`recma-mdx-import-react`](https://www.npmjs.com/package/recma-mdx-import-react)\n  – Recma plugin to ensure getting `React` instance from the arguments and to make the runtime props `{React, jsx, jsxs, jsxDev, Fragment}` is available in the dynamically imported components in the compiled source of MDX.\n- [`recma-mdx-html-override`](https://www.npmjs.com/package/recma-mdx-html-override)\n  – Recma plugin to allow selected raw HTML elements to be overridden via MDX components.\n- [`recma-mdx-interpolate`](https://www.npmjs.com/package/recma-mdx-interpolate)\n  – Recma plugin to enable interpolation of identifiers wrapped in curly braces within the `alt`, `src`, `href`, and `title` attributes of markdown link and image syntax in MDX.\n\n### My Unist Utils and Unified Plugins\n\nI also build low-level utilities and plugins for the Unified ecosystem that can be used across Remark, Rehype, Recma, and other unist-based abstract syntax trees (ASTs).\n\n- [`unist-util-find-between`](https://www.npmjs.com/package/unist-util-find-between)\n  – Unist utility to find the nodes between two nodes.\n- [`unified-log-tree`](https://www.npmjs.com/package/unified-log-tree)\n  – Unified plugin to log abstract syntax trees (ASTs) for debugging without mutating.\n\n## License\n\n[MIT License](./LICENSE) © ipikuka\n\n[unified]: https://github.com/unifiedjs/unified\n[micromark]: https://github.com/micromark/micromark\n[remark]: https://github.com/remarkjs/remark\n[remarkplugins]: https://github.com/remarkjs/remark/blob/main/doc/plugins.md\n[mdast]: https://github.com/syntax-tree/mdast\n[rehype-slug]: https://github.com/rehypejs/rehype-slug\n[rehype-autolink-headings]: https://github.com/rehypejs/rehype-autolink-headings\n\n[badge-npm-version]: https://img.shields.io/npm/v/remark-flexible-toc\n[badge-npm-download]:https://img.shields.io/npm/dt/remark-flexible-toc\n[url-npm-package]: https://www.npmjs.com/package/remark-flexible-toc\n[url-github-package]: https://github.com/ipikuka/remark-flexible-toc\n\n[badge-license]: https://img.shields.io/github/license/ipikuka/remark-flexible-toc\n[url-license]: https://github.com/ipikuka/remark-flexible-toc/blob/main/LICENSE\n\n[badge-publish-to-npm]: https://github.com/ipikuka/remark-flexible-toc/actions/workflows/publish.yml/badge.svg\n[url-publish-github-actions]: https://github.com/ipikuka/remark-flexible-toc/actions/workflows/publish.yml\n\n[badge-typescript]: https://img.shields.io/npm/types/remark-flexible-toc\n[url-typescript]: https://www.typescriptlang.org/\n\n[badge-codecov]: https://codecov.io/gh/ipikuka/remark-flexible-toc/graph/badge.svg?token=QBNX6L8W2G\n[url-codecov]: https://codecov.io/gh/ipikuka/remark-flexible-toc\n\n[badge-type-coverage]: https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Fipikuka%2Fremark-flexible-toc%2Fmaster%2Fpackage.json\n","readmeFilename":"README.md"}