swig-lodash
v1.2.1
Published
Use lodash functions as swig filters
Downloads
5
Readme
#swig-lodash
Use lodash functions as swig filters.
##Install
npm install --save swig-lodash
##Usage
var swigLodash = require('swig-lodash')
, swig = require('swig')
//Add all lodash functions
swigLodash.useFilter(swig)
//Add only one lodash function
swigLodash.useFilter(swig, 'find')
//Add multiple lodash functions
swigLodash.useFilter(swig, ['groupBy', 'shuffle'])
Now you can use the lodash functions as a swig filter.
<p class="name">{{ people|find({age: 23}).name }}</p>
Made with ⚡️ by @taterbase