swig-inflections
v0.1.0
Published
Use i functions as swig filters
Downloads
7
Maintainers
Readme
swig-inflections
Use i functions as swig filters.
##Install
npm install --save swig-inflections
##Usage
var swigInflections = require('swig-inflections'), swig = require('swig')
//Add all i functions
swigInflections.useFilter(swig)
//Add only one i function
swigInflections.useFilter(swig, 'camelize')
//Add multiple i functions
swigInflections.useFilter(swig, ['singularize', 'pluralize'])
Now you can use the i functions as a swig filter.
<p class="cup">{{ cups|singularize }}</p>