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

odesza

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

odesza - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

2

package.json
{
"name": "odesza",
"version": "0.1.2",
"version": "0.1.3",
"description": "Write clean, expressive templates with just HTML and inline JavaScript",

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

@@ -11,11 +11,28 @@ # Odesza

## Variables
Variables are passed in when Odesza templates are rendered. Scope is maintained through includes and extends.
## Variables & Statements
Variables are passed in when Odesza templates are rendered. Scope is maintained through includes and extends. You can also treat `${}` as a function statement.
code
```javascript
var vars = {
name = 'world'
title: 'hello world',
names: ['foo', 'bar']
};
odesza.render('hello, ${name}', vars); // hello world
odesza.compile('hello', vars);
```
hello.ode
```
<title>${title}</title>
<p>
Welcome, ${names.join(',')}!
</p>
```
output
```
<title>hello world</title>
<p>
Welcome, foo, bar
</p>
```

@@ -25,2 +42,10 @@ ## Inline JS

code
```javascript
var vars = {
names: ['wells', 'joe', 'dom']
};
odesza.compile('greetings.ode', vars);
```
greetings.ode

@@ -46,10 +71,2 @@ ```javascript

```
code
```javascript
var vars = {
names: ['wells', 'joe', 'dom']
};
odesza.compile('greetings.ode', vars);
```
output

@@ -64,3 +81,3 @@ ```html

## Partials
Odesza makes it easy to nest templates within each other. You can include templates as many levels deep as you like.
Odesza makes it easy to nest templates within each other. You can include templates as many levels deep as you like. Variables maintain scope in included files.

@@ -67,0 +84,0 @@ greeting.ode

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