Use some lodash goodness with jazzon
npm install jazzon-lodash> Use some lodash goodness with jazzon
``bash`
$ npm install --save jazzon-lodash
The following lodash methods are availible and support passing arguments to (where applicable):
- chunkcompact
- drop
- dropRight
- fill
- first
- flatten
- flattenDeep
- indexOf
- initial
- last
- lastIndexOf
- pull
- pullAt
- rest
- slice
- take
- takeRight
- uniq
- unzip
- without
- at
- includes
- pluck
- sample
- shuffle
- size
- now
- gt
- gte
- isArray
- isBoolean
- isDate
- isEmpty
- isNaN
- isNull
- isNumber
- isObject
- isPlainObject
- isString
- lt
- lte
- add
- ceil
- floor
- max
- min
- round
- sum
- inRange
- random
- findKey
- findLastKey
- get
- has
- invert
- keys
- omit
- pairs
- pick
- set
- values
- camelCase
- capitalize
- deburr
- endsWith
- escape
- kebabCase
- pad
- padLeft
- padRight
- parseInt
- repeat
- snakeCase
- startCase
- startsWith
- trim
- trimLeft
- trimRight
- trunc
- unescape
- words
- uniqueId
-
The following lodash methods operate solely on the current state passed into the helper. Most of them expect an array:
- differenceintersection
- union
- xor
- zip
- zipObject
- merge
-
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
To avoid conflict with other helpers one can prefix all the methods with "lodash" or "_".
``
pick === _.pick === lodash.pick
One can also force a custom prefix using the prefix option.
`
jazzon.use(require('jazzon-lodash')({ prefix: 'foo.' }));
jazzon.compile({ index: '@{ foo.random }' });
``