pug-filters
Code for processing filters in pug templates
Last updated 4 years ago by pug-bot .
MIT · Repository · Original npm · Tarball · package.json
$ npm install pug-filters 
SYNC missed versions from official npm registry.

pug-filters

Code for processing filters in pug templates

Build Status Dependencies Status DevDependencies Status NPM version

Installation

npm install pug-filters

Usage

var filters = require('pug-filters');

filters.handleFilters(ast, filters)

Renders all Filter nodes in a Pug AST (ast), using user-specified filters (filters) or a JSTransformer.

filters.runFilter(name, str[, options[, currentDirectory]])

Invokes filter through jstransformer.

This is internally used in filters.handleFilters, and is a lower-level interface exclusively for invoking JSTransformer-based filters.

name represents the name of the JSTransformer.

str represents the string to render.

currentDirectory is used when attempting to require the transformer module.

options may contain the following properties:

  • minify (boolean): whether or not to attempt minifying the result from the transformer. If minification fails, the original result is returned.

License

MIT

Current Tags

  • 4.0.0-canary-2                                ...           canary (4 years ago)
  • 4.0.0                                ...           latest (4 years ago)

22 Versions

  • 4.0.0                                ...           4 years ago
  • 4.0.0-canary-2                                ...           4 years ago
  • 4.0.0-canary-1                                ...           4 years ago
  • 3.1.1                                ...           5 years ago
  • 3.1.0                                ...           7 years ago
  • 3.0.2                                ...           7 years ago
  • 3.0.1                                ...           7 years ago
  • 3.0.0                                ...           7 years ago
  • 2.1.5                                ...           7 years ago
  • 2.1.4                                ...           7 years ago
  • 2.1.3                                ...           7 years ago
  • 2.1.2                                ...           8 years ago
  • 2.1.1                                ...           8 years ago
  • 2.1.0                                ...           8 years ago
  • 2.0.0                                ...           8 years ago
  • 1.2.4                                ...           8 years ago
  • 1.2.3                                ...           8 years ago
  • 1.2.2                                ...           8 years ago
  • 1.2.1                                ...           9 years ago
  • 1.2.0                                ...           9 years ago
  • 1.1.1                                ...           9 years ago
  • 1.1.0                                ...           9 years ago
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE