Skip to content

Support the && style syntax in safeXml#67

Merged
orangemug merged 1 commit into
mainfrom
feat/support-and-and-syntax
Jun 23, 2026
Merged

Support the && style syntax in safeXml#67
orangemug merged 1 commit into
mainfrom
feat/support-and-and-syntax

Conversation

@orangemug

Copy link
Copy Markdown
Member

The safeXml method now supports

const truthyOutput = safeXml`<name>${true && "this is awesome!"}</name>`;
expect(truthyOutput).toEqual("<name>this is awesome!</name>");
const falseyOutput = safeXml`<name>${false && "this is awesome!"}</name>`;
expect(falseyOutput).toEqual("<name></name>");

@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 31 bytes (0.31%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
package-cjs 5.2kB 31 bytes (0.6%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: package-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.js 31 bytes 5.2kB 0.6%

Files in index.js:

  • ./src/safeXml.ts → Total Size: 851 bytes

@orangemug orangemug merged commit a4e2d76 into main Jun 23, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant