New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

pug-async

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pug-async

A clean, whitespace-sensitive template language for writing HTML

latest
Source
npmnpm
Version
2.0.7
Version published
Weekly downloads
104
8.33%
Maintainers
1
Weekly downloads
 
Created
Source

Async Pug

This repository contains async implementation of Pug template engine.

Original synchronous calls to file system has been replaced by async versions.

It became possible to use database as source of pug-files.

Package

via npm:

$ npm install pug-async

API

(async function () {

  var pug = require('pug-async');
  
  // compile
  var fn = await pug.compile('string of pug', options);
  var html = fn(locals);
  
  // render
  var html = await pug.render('string of pug', merge(options, locals));
  
  // renderFile
  var html = await pug.renderFile('filename.pug', merge(options, locals));

})().then(() => {}, err => { console.error(err); });

License

MIT

FAQs

Package last updated on 25 Jun 2018

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