Socket
Socket
Sign inDemoInstall

pug-filters

Package Overview
Dependencies
22
Maintainers
3
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pug-filters

Code for processing filters in pug templates


Version published
Weekly downloads
1.6M
decreased by-1.95%
Maintainers
3
Install size
4.06 MB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 25 May 2020

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc