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

ljs-template

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ljs-template - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

2

package.json
{
"name": "ljs-template",
"version": "0.1.2",
"version": "0.1.3",
"description": "Lighter Javascript Templates",

@@ -5,0 +5,0 @@ "main": "lib/ljs.js",

@@ -6,3 +6,5 @@ Lighter Javascript Templates

## Install
## How-To
### Install
```

@@ -12,3 +14,3 @@ npm install ljs-template --save

## Render
### Render
```

@@ -22,3 +24,3 @@ var ljs = require('ljs-template');

It displays:
### It displays:
```

@@ -28,23 +30,4 @@ Hello Max

## Template sample
## Sample
### Data :
```
var data =
{
books: [
{
title: "Cravings: Recipes for All the Food You Want to Eat",
authors: ["Chrissy Teigen", "Adeena Sussman"],
price: "$17.85"
},
{
title: "Pretty Happy: Healthy Ways to Love Your Body",
authors: ["Kate Hudson"],
price: "$15.89"
}
]
}
```
### Template :

@@ -56,3 +39,3 @@ ```

{#each books as book, index #}
{#each books as book #}
<h2>{{_book.title_}}</h2>

@@ -76,2 +59,21 @@ <ul>

### Data :
```
var data =
{
books: [
{
title: "Cravings: Recipes for All the Food You Want to Eat",
authors: ["Chrissy Teigen", "Adeena Sussman"],
price: "$17.85"
},
{
title: "Pretty Happy: Healthy Ways to Love Your Body",
authors: ["Kate Hudson"],
price: "$15.89"
}
]
}
```
### Render :

@@ -115,3 +117,3 @@ ```

{%
Javascript code
[javascript]
%}

@@ -122,8 +124,8 @@ ```

```
{#var variable_name = [javascript code] #}
{#var [variable] = [javascript] #}
```
### Display Javascript code :
### Display variable :
```
{{_[Javascript code]_}}
{{_[variable]_}}
```

@@ -133,3 +135,3 @@

```
{#if [Javascript condition] #}
{#if [condition] #}

@@ -143,3 +145,3 @@ {/else/}

```
{#each [javascript code] as [value], [key] #}
{#each [map] as [value], [key] #}
{/each/}

@@ -150,4 +152,4 @@ ```

```
{#each [javascript code] as [value], [index] #}
{#each [array] as [value], [index] #}
{/each/}
```
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