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

koa-views-render

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-views-render

Simple render(page, locals) middleware for Koa and Lad (uses koa-views)

latest
Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
165
-24.31%
Maintainers
1
Weekly downloads
 
Created
Source

koa-views-render

code style styled with prettier made with lass license

Simple render(page, locals) middleware for Koa and Lad (uses koa-views).

Table of Contents

Install

npm:

npm install @ladjs/koa-views-render

yarn:

yarn add @ladjs/koa-views-render

Usage

This is a simple middleware that simply passes down to ctx.render the page and locals arguments you provide.

For example render(page,locals) will get passed to ctx.render(page,locals). See koa-views for full reference.

const render = require('koa-views-render');

// ...

app.use(render('home'));

With optional locals object argument:

app.use(render('about', title: 'About Us' });

Contributors

NameWebsite
Nick Baughhttp://niftylettuce.com/

License

MIT © Nick Baugh

Keywords

render

FAQs

Package last updated on 10 Sep 2017

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