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

razorleaf

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

razorleaf - npm Package Compare versions

Comparing version 0.9.2 to 0.9.3

2

package.json
{
"name": "razorleaf",
"version": "0.9.2",
"version": "0.9.3",
"main": "razorleaf.js",

@@ -5,0 +5,0 @@ "files": ["razorleaf.js"],

@@ -569,7 +569,11 @@ "use strict";

function compile(template) {
function compile(template, options) {
if(typeof template !== "string") {
throw new TypeError("Template should be a string.");
}
var tree = parse(template);
var compiled = templateUtilities + "var __top = {attributes: null, content: '', next: null};\n";
compiled += compileChildren(tree).code;
compiled += compileChildren(tree, options).code;
compiled += "\n\nreturn __top.content;";

@@ -576,0 +580,0 @@

@@ -46,3 +46,3 @@ Razor Leaf is a template engine for HTML. It is indentation-based and vaguely

### `razorleaf.compile(template)`
### `razorleaf.compile(template, [options])`

@@ -53,2 +53,7 @@ Compiles a template and returns a function that renders the template

**`options`** is an object containing options for compilation:
- `loader`: A function that will be called to load parent and included
templates. It is required if either feature is used.
## Syntax

@@ -88,3 +93,3 @@

JavaScript and include the block if the result is truthy (by the same rules
as JavaScript’s `if`).
as JavaScript’s `if`). It may be followed by an `else` block.

@@ -91,0 +96,0 @@ - `doctype` will insert the string `<!DOCTYPE html>`.

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