0.6.0 • Published 8 years ago

adapter-filters v0.6.0

Weekly downloads
4
License
MIT
Repository
-
Last release
8 years ago

adapter-filters

Provides a range of filter functions that can be used with many different template libraries.

wercker status

They are called filters since that is the term used in libraries such as Jekyll and Liquid, but they are the same as helpers in libraries such as Handlebars.

Using the Library

To get a collection of filters, include the module and then call it with the name of the collection to use:

var filters = require('adapter-filters');
var helpers = filters('liquid');

Now the functions can be used anywhere that helpers or filters are required. In the following example we're using the Handlebars plugin for nodemailer:

var hbs = require('nodemailer-express-handlebars');
var handlebars = require('express-handlebars');

transporter.use('compile', hbs({
  viewEngine: handlebars.create({
    defaultLayout: 'email',
    helpers: helpers
  }),
  viewPath: path.resolve(__dirname, 'views')
}));

Documentation

See the adapter-filters wiki for more detailed documentation, including which functions are implemented.

0.6.0

8 years ago

0.5.2

9 years ago

0.5.1

9 years ago

0.5.0

9 years ago

0.4.1

9 years ago

0.4.0

9 years ago

0.3.0

10 years ago

0.2.0

10 years ago