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

kyber

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

kyber

A directive template engine for Node.js

latest
Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
1
-80%
Maintainers
1
Weekly downloads
 
Created
Source

KyberJS

NPM travis

A directive template engine for Node.js

中文文档

Fetures

  • Front-end HTML DOM directive driver;
  • Templates support asynchronous functions based on async, await;
  • Built-in support for HTML minify;
  • Friendly APIs, flexible extensions, support for custom directives, filters, tags;

Support

  • Node 8+

Install

  • Use npm to install
npm install --save kyber

Usage

Simple for file rendering;

const kyber = require('kyber');

const init = async function init() {
    const res = await kyber.render('template.html', {list: ['<hr/>', 'foo', 'bar'], title: 'Hello Kyber'});
    console.log(res);
};

init();

Use with Koa

const Koa = require('koa');
const kyber = require('kyber');

const app = new Koa();

app.use(async ctx => {
    ctx.body = await kyber.render('index.html');
});

app.listen(3000);

API and template syntax

See here;

Contribute

KyberJS is still in development, and if you have problems using KyberJS, or if you have a good suggestion, please open a Issue or make a Pull Request.

License

MIT

Keywords

kyberjs

FAQs

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