0.2.1 • Published 10 years ago
jazzon-lodash v0.2.1
jazzon-lodash
Use some lodash goodness with jazzon
Installation
$ npm install --save jazzon-lodashUsage
The following lodash methods are availible and support passing arguments to (where applicable):
chunkcompactdropdropRightfillfirstflattenflattenDeepindexOfinitiallastlastIndexOfpullpullAtrestslicetaketakeRightuniqunzipwithoutatincludesplucksampleshufflesizenowgtgteisArrayisBooleanisDateisEmptyisNaNisNullisNumberisObjectisPlainObjectisStringltlteaddceilfloormaxminroundsuminRangerandomfindKeyfindLastKeygethasinvertkeysomitpairspicksetvaluescamelCasecapitalizedeburrendsWithescapekebabCasepadpadLeftpadRightparseIntrepeatsnakeCasestartCasestartsWithtrimtrimLefttrimRighttruncunescapewordsuniqueId
The following lodash methods operate solely on the current state passed into the helper. Most of them expect an array:
differenceintersectionunionxorzipzipObjectmerge
The template method is also supported. The template string passed in as an argument is rendered using the current state (passed from previous helper):
template
Conflicting helper names
To avoid conflict with other helpers one can prefix all the methods with "lodash" or "_".
pick === _.pick === lodash.pickOne can also force a custom prefix using the prefix option.
jazzon.use(require('jazzon-lodash')({ prefix: 'foo.' }));
jazzon.compile({ index: '@{ foo.random }' });