Socket
Book a DemoInstallSign in
Socket

twig-drupal-filters

Package Overview
Dependencies
Maintainers
5
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twig-drupal-filters

Drupal's Twig filters, implemented for Twig.js

latest
Source
npmnpm
Version
3.2.0
Version published
Weekly downloads
17K
-11.16%
Maintainers
5
Weekly downloads
 
Created
Source

Twig.js Drupal Extensions

Greenkeeper badge Build Status

Twig.js implementations of Drupal's Twig functions and filters. Most of these are just stubbed creations from John Albin's work in KSS-Node.

Usage

var Twig = require('twig')
var twigDrupal = require('twig-drupal-filters')

// Add the filters to Drupal.
twigDrupal(Twig);
{{ 'Hello World!'|clean_id }}

Filters

A comprehensive list of the filters is available here.

  • t
  • trans
  • placeholder
  • without
  • clean_class
  • clean_id
  • render
  • path
  • url
  • format_date
  • drupal_escape
  • safe_join

Functions

  • link
  • active_theme*
  • attach_library*

*These are dummy functions that don't do anything except keep Twig.js compilation from breaking when these Drupal-specific functions are used in Drupal Twig templates.

Keywords

Drupal

FAQs

Package last updated on 28 Oct 2022

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