Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 626 Bytes

README.md

File metadata and controls

27 lines (18 loc) · 626 Bytes

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>