{"_id":"unified-conditional","_rev":"1-55e9e4b0dc78221f773301d3174f86a2","name":"unified-conditional","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"unified-conditional","version":"0.0.1","description":"Apply unified plugins conditionally","author":{"name":"Brad Cornes"},"license":"MIT","homepage":"https://github.com/bradlc/unified-conditional#readme","repository":{"type":"git","url":"git+https://github.com/bradlc/unified-conditional.git"},"bugs":{"url":"https://github.com/bradlc/unified-conditional/issues"},"type":"module","main":"index.js","keywords":["unified","remark","rehype","mdx"],"scripts":{"test":"node test.js"},"devDependencies":{"remark":"^14.0.2","uvu":"^0.5.6","vfile":"^5.3.6"},"gitHead":"50fa54a88ab5546b77e5cf8f9b7b0622b09b505a","_id":"unified-conditional@0.0.1","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-2UAO+e8fPtpHZdjbRao6sail7dMNyUgmurQ0qlXvkJ5ZHiZzFCa6qg/HuFgGne5R/hCX2LFUNN15Cg2OX2Glqg==","shasum":"1d5c2ae140ad421af9f24ceaf52102526d2836c6","tarball":"https://registry.npmjs.org/unified-conditional/-/unified-conditional-0.0.1.tgz","fileCount":4,"unpackedSize":3423,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAV57okArW5rlCym883kMBBn9K5OWoK0s22oWC+/ndqWAiEAvNwkmSJ3hNyLbI+qAXkZ2WQd1gemCTeHsLn5rMuzflE="}]},"_npmUser":{"name":"bradlc","email":"bradlc41@gmail.com"},"directories":{},"maintainers":[{"name":"bradlc","email":"bradlc41@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unified-conditional_0.0.1_1687954288281_0.9291502560887503"},"_hasShrinkwrap":false},"0.0.2":{"name":"unified-conditional","version":"0.0.2","description":"Apply unified plugins conditionally","author":{"name":"Brad Cornes"},"license":"MIT","homepage":"https://github.com/bradlc/unified-conditional#readme","repository":{"type":"git","url":"git+https://github.com/bradlc/unified-conditional.git"},"bugs":{"url":"https://github.com/bradlc/unified-conditional/issues"},"type":"module","main":"index.js","keywords":["unified","remark","rehype","mdx"],"scripts":{"test":"node test.js"},"devDependencies":{"remark":"^14.0.2","uvu":"^0.5.6","vfile":"^5.3.6"},"gitHead":"4054b704dc82c3b66ff0da920015f701e13b9890","_id":"unified-conditional@0.0.2","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-FHbJ+A3iGIoJeFjpW4VigezGkHgB81iSVICb3tp1VcfVMiB80y7PWNAJPDV0RlTAxC5tst/9Q+voScMF4JZIZQ==","shasum":"ef5098ff7ba386921d246d1a7c0006e1ec811821","tarball":"https://registry.npmjs.org/unified-conditional/-/unified-conditional-0.0.2.tgz","fileCount":4,"unpackedSize":3415,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCIQlNmD0X0NZvu9wWUnNUJxSon5SgCoKl8R87ASCaFhgIgSfKzcSmWqme2XRyD9GW3+ekhXddIMn+c3JQcO/ae/Ds="}]},"_npmUser":{"name":"bradlc","email":"bradlc41@gmail.com"},"directories":{},"maintainers":[{"name":"bradlc","email":"bradlc41@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unified-conditional_0.0.2_1687954368057_0.021858925832868525"},"_hasShrinkwrap":false}},"time":{"created":"2023-06-28T12:11:28.280Z","0.0.1":"2023-06-28T12:11:28.428Z","modified":"2023-06-28T12:12:48.326Z","0.0.2":"2023-06-28T12:12:48.221Z"},"maintainers":[{"name":"bradlc","email":"bradlc41@gmail.com"}],"description":"Apply unified plugins conditionally","homepage":"https://github.com/bradlc/unified-conditional#readme","keywords":["unified","remark","rehype","mdx"],"repository":{"type":"git","url":"git+https://github.com/bradlc/unified-conditional.git"},"author":{"name":"Brad Cornes"},"bugs":{"url":"https://github.com/bradlc/unified-conditional/issues"},"license":"MIT","readme":"# unified-conditional\n\n> Apply [unified](https://unifiedjs.com/) plugins conditionally\n\n## Usage\n\n```js\nimport { remark } from 'remark'\nimport { VFile } from 'vfile'\nimport { unifiedConditional } from 'unified-conditional'\n\nlet options = [\n  // Pattern to match\n  /example\\.md$/,\n  // Plugins to run if pattern matches\n  [/* ... */],\n  // Plugins to run if pattern does not match\n  [/* ... */],\n]\n\nawait remark()\n  .use(unifiedConditional, options)\n  .process(new VFile({ path: '/example.md', value: '# Hello world' }))\n```\n\nThe pattern can be one of three types:\n\n- `string`: String value to match the filename against exactly\n- `RegExp`: Regular expression to test the filename against\n- `function`: Custom match function which receives the [transformer](https://github.com/unifiedjs/unified#function-transformertree-file-next) arguments and returns a boolean value\n","readmeFilename":"README.md"}