nest-jsx-template-engine
Advanced tools
Comparing version 0.2.0 to 0.2.1
{ | ||
"name": "nest-jsx-template-engine", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "JSX-based + typescript template engine for NestJS applications", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
11
src/h.ts
@@ -10,11 +10,10 @@ function stringifyChildren(child: any): string { | ||
stringifiedChild = child.join('\n') | ||
} | ||
// there's a value that exposes a `toString` coercion method | ||
if (child && typeof child.toString === 'function') { | ||
} else if (child && typeof child.toString === 'function') { | ||
// there's a value that exposes a `toString` coercion method | ||
stringifiedChild = child.toString(); | ||
} | ||
// coerce a number of falsey varietes to a string | ||
if (!child) { | ||
// coerce a number of falsey varietes to a string, but exclude null, | ||
// which is the standard behavior of React's JSX engine | ||
if (!child && child !== null) { | ||
stringifiedChild = `${child}`; | ||
@@ -21,0 +20,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
361223