You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

eta_plugin_mixins

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eta_plugin_mixins

Add mixins support to the Eta template engine

1.0.0-0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

eta_plugin_mixins

GitHub package.json version (master) deno module Travis All Contributors Coveralls

Adds mixin support to the Eta template engine

🌟 Examples

A simple example

<% /* Define the mixin */ %>

<% let body = {@ %>
This is the template body
<% @} %>

<% /* Use the mixin */ %>
<%~ body() %>

Passing data to a mixin

<% let greeting = {@ %>
Hi <%= it.name %>
<% @} %>

<%= greeting({name: "Your Name"}) %>

📜 Usage

import mixins from 'eta_plugin_mixins'
// Or, with Deno
import mixins from 'https://deno.land/x/eta_plugin_mixins/mod.ts'

eta.configure({
  plugins: [mixins()]
})

✔️ Tests

Tests can be run with npm test. Multiple tests check that parsing, rendering, and compiling return expected results, formatting follows guidelines, and code coverage is at the expected level.

Resources

To be added

Projects using eta_plugin_mixins

  • Add yours!

Contributors

Made with ❤ by @nebrelbug and all these wonderful contributors (emoji key):


Ben Gubler

💻 💬 📖 ⚠️

This project follows the all-contributors specification. Contributions of any kind are welcome!

Credits

Keywords

eta

FAQs

Package last updated on 02 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.