{"_id":"@ciolabs/html-find-conditional-comments","_rev":"3-1292b630e508902d8b62cc600964469f","name":"@ciolabs/html-find-conditional-comments","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.0":{"name":"@ciolabs/html-find-conditional-comments","version":"0.0.0","keywords":["conditional","comments","html","email","outlook","mso"],"author":{"name":"Customer.io","email":"win@customer.io"},"license":"MIT","_id":"@ciolabs/html-find-conditional-comments@0.0.0","maintainers":[{"name":"ami-ci","email":"engineering@customer.io"}],"homepage":"https://github.com/customerio/ciolabs/tree/main/packages/html-find-conditional-comments#readme","bugs":{"url":"https://github.com/customerio/ciolabs/issues"},"dist":{"shasum":"4f946af557f619443276ca3bdad7d217ccc6ceff","tarball":"https://registry.npmjs.org/@ciolabs/html-find-conditional-comments/-/html-find-conditional-comments-0.0.0.tgz","fileCount":9,"integrity":"sha512-fImf9/8dZQ0z92jq0Z9o+wZMDA+HAgEkHOkp8xe3AfzgZeeSs+16zFBXmVGOIQhAE5A/evDyS42N9nPJvEKSYw==","signatures":[{"sig":"MEUCIQCiIiaQM1Jh3GR7DBNuzuM9qCj3VX+c0KnD4Bxtb00vOgIgJwwEEoEuk9e41ONrp9oDn4wEiwjNSy5wpaRvt2hiFt4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19871},"main":"./dist/index.js","_from":"file:ciolabs-html-find-conditional-comments-0.0.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"ami-ci","email":"engineering@customer.io"},"_resolved":"/tmp/7ff1cc37d0141a578872e980e99256d7/ciolabs-html-find-conditional-comments-0.0.0.tgz","_integrity":"sha512-fImf9/8dZQ0z92jq0Z9o+wZMDA+HAgEkHOkp8xe3AfzgZeeSs+16zFBXmVGOIQhAE5A/evDyS42N9nPJvEKSYw==","repository":{"url":"git+https://github.com/customerio/ciolabs.git","type":"git","directory":"packages/html-find-conditional-comments"},"_npmVersion":"10.8.2","description":"Finds all conditional comments in a string","directories":{},"_nodeVersion":"18.20.8","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/html-find-conditional-comments_0.0.0_1758215071121_0.21982631000547959","host":"s3://npm-registry-packages-npm-production"}},"0.0.1":{"name":"@ciolabs/html-find-conditional-comments","version":"0.0.1","keywords":["conditional","comments","html","email","outlook","mso"],"author":{"name":"Customer.io","email":"win@customer.io"},"license":"Apache-2.0 WITH Commons-Clause","_id":"@ciolabs/html-find-conditional-comments@0.0.1","maintainers":[{"name":"ami-ci","email":"engineering@customer.io"}],"homepage":"https://github.com/customerio/ciolabs/tree/main/packages/html-find-conditional-comments#readme","bugs":{"url":"https://github.com/customerio/ciolabs/issues"},"dist":{"shasum":"4d2298c9754e78b5a597cfd513d891bb90e6e053","tarball":"https://registry.npmjs.org/@ciolabs/html-find-conditional-comments/-/html-find-conditional-comments-0.0.1.tgz","fileCount":9,"integrity":"sha512-S8zWx7xOxBSSpIXy6yaM2oyV2ZPCPYEHoP7pNAwDSWv4F1+FceQnq6hGD9Ck0ILoqjdTpKaS3sbrDs4MwC3ILw==","signatures":[{"sig":"MEUCIQC3sHZH+keAXbGbaGAG6DJjUe3S30q0CK31LbUVGkuC0gIgSUvFkIOszF8cABj7nwFZR5H9TgU1d9PrbSjv56K9op8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20428},"main":"./dist/index.js","_from":"file:ciolabs-html-find-conditional-comments-0.0.1.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"ami-ci","email":"engineering@customer.io"},"_resolved":"/tmp/78de401f1189381dbf093e716816a548/ciolabs-html-find-conditional-comments-0.0.1.tgz","_integrity":"sha512-S8zWx7xOxBSSpIXy6yaM2oyV2ZPCPYEHoP7pNAwDSWv4F1+FceQnq6hGD9Ck0ILoqjdTpKaS3sbrDs4MwC3ILw==","repository":{"url":"git+https://github.com/customerio/ciolabs.git","type":"git","directory":"packages/html-find-conditional-comments"},"_npmVersion":"10.8.2","description":"Finds all conditional comments in a string","directories":{},"_nodeVersion":"18.20.8","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/html-find-conditional-comments_0.0.1_1758233183225_0.9863330052019601","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@ciolabs/html-find-conditional-comments","version":"0.0.2","description":"Finds all conditional comments in a string","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.js","import":"./dist/index.mjs"}},"author":{"name":"Customer.io","email":"win@customer.io"},"license":"Apache-2.0 WITH Commons-Clause","repository":{"type":"git","url":"git+https://github.com/customerio/ciolabs.git","directory":"packages/html-find-conditional-comments"},"homepage":"https://github.com/customerio/ciolabs/tree/main/packages/html-find-conditional-comments#readme","publishConfig":{"access":"public"},"keywords":["conditional","comments","html","email","outlook","mso"],"scripts":{"build":"tsup","dev":"tsup --watch","clean":"rm -rf dist","test":"vitest run"},"_id":"@ciolabs/html-find-conditional-comments@0.0.2","bugs":{"url":"https://github.com/customerio/ciolabs/issues"},"_integrity":"sha512-rWvB0vgpy7BinGGlUmAkqvmUz9DRKEL4s2vf2y+Fmz1/+WDfwE8lvr9X/MW2zx3lpLQ5giqY5ob8glDSuIr7ew==","_resolved":"/tmp/f68afc3b32c851334e9f512123f5ff4b/ciolabs-html-find-conditional-comments-0.0.2.tgz","_from":"file:ciolabs-html-find-conditional-comments-0.0.2.tgz","_nodeVersion":"18.20.8","_npmVersion":"10.8.2","dist":{"integrity":"sha512-rWvB0vgpy7BinGGlUmAkqvmUz9DRKEL4s2vf2y+Fmz1/+WDfwE8lvr9X/MW2zx3lpLQ5giqY5ob8glDSuIr7ew==","shasum":"2dd35f123a3a88de132b2d9354d744766869c76f","tarball":"https://registry.npmjs.org/@ciolabs/html-find-conditional-comments/-/html-find-conditional-comments-0.0.2.tgz","fileCount":9,"unpackedSize":20456,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFOP/C+RTl9AOpV2HHj4zIqkm4Hm+5fMBDZw7wvtE5dTAiBn4oJIJxex5LUSl10UkNjbyU8n9SHDGfP6DtaGMPgagA=="}]},"_npmUser":{"name":"ami-ci","email":"engineering@customer.io"},"directories":{},"maintainers":[{"name":"ami-ci","email":"engineering@customer.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/html-find-conditional-comments_0.0.2_1763396455707_0.385375124151101"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-18T17:04:30.706Z","modified":"2025-11-17T16:20:56.174Z","0.0.0":"2025-09-18T17:04:31.325Z","0.0.1":"2025-09-18T22:06:23.405Z","0.0.2":"2025-11-17T16:20:55.970Z"},"bugs":{"url":"https://github.com/customerio/ciolabs/issues"},"author":{"name":"Customer.io","email":"win@customer.io"},"license":"Apache-2.0 WITH Commons-Clause","homepage":"https://github.com/customerio/ciolabs/tree/main/packages/html-find-conditional-comments#readme","keywords":["conditional","comments","html","email","outlook","mso"],"repository":{"type":"git","url":"git+https://github.com/customerio/ciolabs.git","directory":"packages/html-find-conditional-comments"},"description":"Finds all conditional comments in a string","maintainers":[{"name":"ami-ci","email":"engineering@customer.io"}],"readme":"# @ciolabs/html-find-conditional-comments\n\n> Finds all conditional comments in a string\n\n## Install\n\n```bash\nnpm install @ciolabs/html-find-conditional-comments\n```\n\n## Usage\n\n```js\nimport findConditionalComments from '@ciolabs/html-find-conditional-comments';\n\nconst html = `\n<!--[if mso]>\nHello, Microsoft Outlook!\n<![endif]-->\n`;\n\nfindConditionalComments(html);\n//=> [ { open: \"<!--[if mso]>\", close: \"<![endif]-->\", range: [1, 63], downlevel: \"hidden\", isComment: true, bubble: false } ]\n```\n\n## API\n\n### findConditionalComments(html)\n\nReturns an Array of Objects for each comment with the following properties:\n\n#### isComment\n\n> `boolean`\n\nWhether the comment is an HTML comment. This might be `false` for certain items when `downlevel` is `revealed`.\n\n#### open\n\n> `string`\n\nOpening portion of the conditional comment.\n\n#### close\n\n> `string`\n\nClosing portion of the conditional comment.\n\n#### bubble\n\n> `boolean`\n\nWhether the comment \"bubbles\" around the value.\n\nWhen `true`, the comment is visible to all platforms except those that support conditional comments.\n\n```html\n<!--[if !mso]>-->\nHello, Not Microsoft Outlook!\n<!--<![endif]-->\n```\n\nWhen `false`, the comment is hidden from all platforms except those that support conditional comments.\n\n```html\n<!--[if mso]> Hello, Microsoft Outlook! <![endif]-->\n```\n\n#### downlevel\n\n> `'hidden' | 'revealed'`\n\nEither `hidden` or `revealed`.\n\n`hidden` means the comment is hidden from all platforms except those that support conditional comments.\n\n`revealed` means the comment is visible to all platforms except those that support conditional comments.\n\nThis is very similar to the `bubble` property, but it's not the same.\n\n`downlevel` always be `revealed` if `bubble` is `true`.\n\nBut `bubble` can be `true` even if `downlevel` is `hidden` when using this syntax:\n\n```html\n<![if lt IE 8]>\n<p>Please upgrade to Internet Explorer version 8.</p>\n<![endif]>\n```\n\nLearn more about [downlevel conditional comments](<https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/compatibility/ms537512(v%3dvs.85)#downlevel-hidden-conditional-comments>).\n\n#### range\n\n> `[number, number]`\n\nA range array containing the start and end indices of the comment.\n\n## TypeScript Support\n\nThis package is built with TypeScript and provides full type definitions.\n","readmeFilename":"README.md"}