swig-inflections

0.1.0 • Public • Published

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>

Package Sidebar

Install

npm i swig-inflections

Weekly Downloads

3

Version

0.1.0

License

MIT

Last publish

Collaborators

  • rdiaztushman