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

dustjs-loader

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

dustjs-loader

Require and automatically compile dustjs (.dust) files.

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
47
-32.86%
Maintainers
1
Weekly downloads
 
Created
Source

NPM version

dustjs-loader

Module to automatically compile and cache dustjs (.dust) files.

Installation

This package is available on npm as:

npm install dustjs-loader

Examples

Example using a callback:

require('dustjs-loader').register({
  path: 'lib/templates'
});

var template = require('./template.dust');

template({ foo : 42 }, function (error, html) {
  if (error) { ... }
  ...
});

Example using a promise:

require('dustjs-loader').register({
   path    : 'lib/templates',
   promise : true
});

var template = require('./template.dust');

template({ foo : 42 })
  .then(function (html) {
    ...
  })
  .catch(function (error) {
    ...
  });

Dust templates in the browser

The dustjs-browserify module makes it easy to use dust templates in the browser.

Dustjs documentation

Security

License

MIT

Keywords

dust

FAQs

Package last updated on 24 Jun 2015

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