
Security News
pnpm 11.5 Adds Support for Recognizing npm Staged Publishes
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.
@devidw/brktfldg
Advanced tools
Bracket folding. Collapse and expand all brackets on any website.
Read about the project
Load the library using the following CDN link from jsDelivr:
https://cdn.jsdelivr.net/npm/@devidw/brktfldg
To add collapse/expand functionality to all brackets inside an element and its children, use the collapseBrackets(el, options) function:
<p>This is a paragraph (and this is something useless).</p>
<script type="module">
import { collapseBrackets } from "https://cdn.jsdelivr.net/npm/@devidw/brktfldg"
collapseBrackets(document.querySelector("p"))
</script>
Optionally an options object can be passed to the collapseBrackets function to configure the behaviour and look of the interactive brackets.
The following configuration options are available with their default values:
{
needles: ["(", ")"], // The characters to search for
needleRegex: /\((?!\))|(?<!\()\)/g, // The regex to test text nodes for
replacements: ["(", ")"], // Replaces the original opening and closing bracket characters with the given ones
placeholder: "…", // Displayed as text for the toggle to expand and collapse the content
shortMaxWords: 1, // Number of words to determine if the content is short, quick expanding is possible on short conent when enabled and the word count is not displayed on short content
wordCount: true, // Show word count
expandShortOnHover: true, // Expand brackets with short content on hover
ignoreTags: ["script", "style", "pre", "code", "brktfldg-container"], // Ignore these tags
}
FAQs
Bracket folding. Collapse and expand all brackets on any website.
We found that @devidw/brktfldg demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.