New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

alar-ejs-loader

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

alar-ejs-loader

Ejs loader for Alar framework.

  • 1.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-81.25%
Maintainers
1
Weekly downloads
 
Created
Source

Alar-Ejs-Loader

Ejs loader for Alar framework.

When using this loader, ejs files can be loaded as Alar modules and take benefits of auto-loading and hot-reloading.

For information about ejs, please visit https://www.npmjs.com/package/ejs.

Example

import { ModuleProxy } from "alar";
import { EjsLoader } from "alar-ejs-loader";

var view = new ModuleProxy("views", __dirname + "/views");

view.setLoader(new EjsLoader());

// assume there is hello.ejs file in views
// every ejs module instance (EjsLoader.View) has a render method and accepts an
// argument as data parsed to the template.
view.hello.instance().render({ /* data */ });

API

new EjsLoader(options?: EjsLoader.Options)

Interface Options includes:

  • encoding?: string Specifies encoding for loading the template (default: utf8).
  • compileDebug: boolean When false no debug instrumentation is compiled.
  • delimiter: string Character to use with angle brackets for open/close.
  • debug: boolean Outputs generated function body.
  • strict: boolean When true, generated function is in strict mode.
  • rmWhitespace: boolean Removes all safe-to-remove whitespace, including leading and trailing whitespace.

Keywords

FAQs

Package last updated on 16 May 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

  • 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