Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

liquidless

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

liquidless - npm Package Compare versions

Comparing version 1.0.9 to 1.1.0

1

dist/index.d.ts
import { Filters } from './filters';
declare type RenderOptions = {
filters?: Filters;
delimiters?: string[];
};
export declare function renderTemplate(template: string | object, props: object, options?: RenderOptions): string | object | never;
export {};

5

dist/index.js

@@ -12,3 +12,6 @@ "use strict";

const flatProps = (0, flat_1.default)(props);
return template.replaceAll(/{{(.+?)}}/g, (a, match) => {
let delimiters = ['{{', '}}'];
if (options?.delimiters)
delimiters = options.delimiters;
return template.replaceAll(new RegExp(`\\${delimiters[0]}(.+?)${delimiters[1]}`, 'g'), (a, match) => {
const [variable, ...filters] = match.split('|');

@@ -15,0 +18,0 @@ const combinedFilters = { ...filters_1.defaultFilters, ...options?.filters };

{
"name": "liquidless",
"version": "1.0.9",
"version": "1.1.0",
"description": "Shopify's Liquid template engine, but less powerful",

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

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