New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

find-conditional-comments

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

find-conditional-comments - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

index.d.ts

1

index.js

@@ -13,2 +13,3 @@ const CONDITIONAL_COMMENT_REGEX = /(<!(--)?\[if\s[()\w\s|&!]+\]>(?:<!--+>)?)((?:.|\n)*?)((?:<!--)?<!\[endif\]\2>)/gi;

comments.push({
isComment: open.startsWith("<!--"),
open,

@@ -15,0 +16,0 @@ close,

2

package.json
{
"name": "find-conditional-comments",
"version": "0.0.4",
"version": "0.0.5",
"description": "Finds all conditional comments in a string",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -36,2 +36,8 @@ # find-conditional-comments

### isComment
> `boolean`
Whether the comment is an HTML comment. This might be `false` for certain items when `downlevel` is `revealed`.
#### open

@@ -47,7 +53,46 @@ > `String`

### bubble
> `boolean`
Whether the comment "bubbles" around the value.
When `true`, the comment is visible to all platforms except those that support conditional comments.
```
<!--[if !mso]>-->
Hello, Not Microsoft Outlook!
<!--<![endif]-->
```
When `false`, the comment is hidden from all platforms except those that support conditional comments.
```
<!--[if mso]>
Hello, Microsoft Outlook!
<![endif]-->
```
#### downlevel
> `String`
Either `hidden` or `revealed`. [Learn more](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/compatibility/ms537512(v%3dvs.85)#downlevel-hidden-conditional-comments).
Either `hidden` or `revealed`.
`hidden` means the comment is hidden from all platforms except those that support conditional comments.
`revealed` means the comment is visible to all platforms except those that support conditional comments.
This is very similar to the `bubble` property, but it's not the same.
`downlevel` always be `revealed` if `bubble` is `true`.
But `bubble` can be `true` even if `downlevel` is `hidden` when using this syntax:
```html
<![if lt IE 8]>
<p>Please upgrade to Internet Explorer version 8.</p>
<![endif]>
```
[Learn more](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/compatibility/ms537512(v%3dvs.85)#downlevel-hidden-conditional-comments).
#### range

@@ -54,0 +99,0 @@ > `Array`

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc