stencilproject / Stencil

Stencil is a simple and powerful template language for Swift.
https://stencil.fuller.li
BSD 2-Clause "Simplified" License
2.34k stars 223 forks source link

Added method to register boolean filters #160

Closed ilyapuchka closed 5 years ago

ilyapuchka commented 6 years ago

This was touched on in the discussion here https://github.com/SwiftGen/StencilSwiftKit/pull/69 and we are extensively using such approach in Sourcery for our custom filters. Would be nice if it would be available out of the box.

Benefit of such approach compared to using not, as mentioned in the discussion, is that it works with filters chaining.

ilyapuchka commented 6 years ago

@AliSoftware @djbe this is what is there already in StencilSwiftKit, so consider it first step in moving filters from StencilSwiftKit

ilyapuchka commented 5 years ago

@kylef @yonaskolb @djbe can we move on with this please?

ilyapuchka commented 5 years ago

@djbe updated docs, also removed Boolean from method name as it is unambiguous anyway