{"versions":{"1.0.0":{"name":"@types/section-matter","version":"1.0.0","license":"MIT","_id":"@types/section-matter@1.0.0","maintainers":[{"name":"anonymous","email":"ts-npm-types@microsoft.com"}],"contributors":[{"url":"https://github.com/jonschlinkert","name":"Jon Schlinkert","githubUsername":"jonschlinkert"},{"url":"https://github.com/gasp","name":"gaspard","githubUsername":"gasp"}],"homepage":"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/section-matter","dist":{"shasum":"1f3660d046a79e6eae4a613acfb78286ec2ed9c4","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@types/section-matter/-/section-matter-1.0.0.tgz","fileCount":5,"integrity":"sha512-vv0+hN2L0chBwjgWXfw1OrgFt7hFAf3MSgvYJvVO2phJD6CcDyBcHtEXafxWw1xiaagvXGY1sADmPCA0ngSPCQ==","signatures":[{"sig":"MEUCIQCu4VeNRU2tAHLuZxSgoE4dgl8E4WE7UwrpOaZUaRHp3wIgO3lgC2eM4EJ1sZVOJjZkK1HWzo7pXp3HhvNM5aHsnMI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7083,"size":2339},"main":"","types":"index.d.ts","scripts":{},"_npmUser":{"name":"anonymous","email":"ts-npm-types@microsoft.com"},"repository":{"url":"https://github.com/DefinitelyTyped/DefinitelyTyped.git","type":"git","directory":"types/section-matter"},"description":"TypeScript definitions for section-matter","directories":{},"_nodeVersion":"24.13.0","dependencies":{"@types/node":"*"},"_hasShrinkwrap":false,"peerDependencies":{},"typeScriptVersion":"5.2","_npmOperationalInternal":{"tmp":"tmp/section-matter_1.0.0_1770232496816_0.9428143132475706","host":"s3://npm-registry-packages-npm-production"},"typesPublisherContentHash":"a09259e34c275397bbe5249c878f1e024c528749ea45657b71705c049f67394e","_cnpmcore_publish_time":"2026-02-04T19:14:56.955Z","publish_time":1770232496955,"_source_registry_name":"default"}},"dist-tags":{"latest":"1.0.0","ts5.2":"1.0.0","ts5.3":"1.0.0","ts5.4":"1.0.0","ts5.5":"1.0.0","ts5.6":"1.0.0","ts5.7":"1.0.0","ts5.8":"1.0.0","ts5.9":"1.0.0","ts6.0":"1.0.0","ts7.0":"1.0.0","ts7.1":"1.0.0"},"name":"@types/section-matter","time":{"created":"2026-04-01T17:46:27.645Z","modified":"2026-10-04T09:06:30.494Z","1.0.0":"2026-02-04T19:14:56.955Z"},"readme":"# Installation\r\n> `npm install --save @types/section-matter`\r\n\r\n# Summary\r\nThis package contains type definitions for section-matter (https://github.com/jonschlinkert/section-matter).\r\n\r\n# Details\r\nFiles were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/section-matter.\r\n## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/section-matter/index.d.ts)\r\n````ts\r\n/// <reference types=\"node\" />\n\n/**\n * A section parsed from the input.\n */\ninterface Section {\n    /** The key/name of the section (text after the opening delimiter) */\n    key: string;\n    /** The data content between the opening and closing delimiters */\n    data: string;\n    /** The content after the closing delimiter */\n    content: string;\n}\n\n/**\n * Options for parsing sections.\n */\ninterface SectionMatterOptions {\n    /**\n     * Delimiter to use as the separator for sections.\n     * @default '---'\n     */\n    section_delimiter?: string;\n\n    /**\n     * Function to be called on each section after it's parsed.\n     * Can be used to transform the section data.\n     */\n    parse?: (section: Section, sections: Section[]) => void;\n}\n\n/**\n * Input object with content property.\n */\ninterface SectionMatterInput {\n    content: string | Buffer;\n    [key: string]: unknown;\n}\n\n/**\n * Result returned by section-matter.\n */\ninterface SectionMatterResult {\n    /** Content before the first section */\n    content: string;\n    /** Array of parsed sections */\n    sections: Section[];\n    /** Additional properties from input object are preserved */\n    [key: string]: unknown;\n}\n\n/**\n * Parse sections in the input with the given options.\n * Like front-matter, but supports multiple sections in a document.\n *\n * @param input - String, Buffer, or object with content property\n * @param options - Parse options or parse function\n * @returns Object with content string and sections array\n *\n * @example\n * ```javascript\n * var sections = require('section-matter');\n *\n * var result = sections('Content\\n\\n---one\\ndata\\n---\\nSection content');\n * // { content: 'Content\\n', sections: [{ key: 'one', data: 'data', content: 'Section content' }] }\n * ```\n */\ndeclare function sectionMatter(\n    input: string | Buffer | SectionMatterInput,\n    options?: SectionMatterOptions | ((section: Section, sections: Section[]) => void),\n): SectionMatterResult;\n\ndeclare namespace sectionMatter {\n    export { Section, SectionMatterInput, SectionMatterOptions, SectionMatterResult };\n}\n\nexport = sectionMatter;\n\r\n````\r\n\r\n### Additional Details\r\n * Last updated: Wed, 04 Feb 2026 19:14:55 GMT\r\n * Dependencies: [@types/node](https://npmjs.com/package/@types/node)\r\n\r\n# Credits\r\nThese definitions were written by [Jon Schlinkert](https://github.com/jonschlinkert), and [gaspard](https://github.com/gasp).","users":{}}