liquidless
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -15,3 +15,3 @@ "use strict"; | ||
delimiters = options.delimiters; | ||
return template.replaceAll(new RegExp(`\\${delimiters[0]}(.+?)${delimiters[1]}`, 'g'), (a, match) => { | ||
return template.replaceAll(new RegExp(`\\${delimiters[0]}(.+?)${delimiters[1]}`, 'g'), (_, match) => { | ||
const [variable, ...filters] = match.split('|'); | ||
@@ -48,3 +48,4 @@ const combinedFilters = { ...filters_1.defaultFilters, ...options?.filters }; | ||
else if (typeof obj[key] === 'string') { | ||
obj[key] = renderString(obj[key], props, options); | ||
const rendered = renderString(obj[key], props, options); | ||
obj[key] = isNaN(parseInt(rendered)) ? rendered : parseInt(rendered); | ||
} | ||
@@ -51,0 +52,0 @@ } |
{ | ||
"name": "liquidless", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Shopify's Liquid template engine, but less powerful", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
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
6078
76
1