lodash functions as handlebars helpers
This simple library exports an object of helper functions from lodash 4, modified slightly to work properly as handlebars helpers. See Comparison Helpers and String Helpers for a list of available functions.
Download Node.js 4 or greater.
npm install lobars --save
const handlebars = require('handlebars')
const lobars = require("lobars")
handlebars.registerHelper(lobars)
These functions all return true
or false
:
- endsWith
- eq
- gt
- gte
- includes
- isArguments
- isArray
- isArrayLike
- isArrayLikeObject
- isBoolean
- isDate
- isElement
- isEmpty
- isEqual
- isEqualWith
- isError
- isFinite
- isFunction
- isInteger
- isLength
- isMatch
- isMatchWith
- isNaN
- isNative
- isNil
- isNull
- isNumber
- isObject
- isObjectLike
- isPlainObject
- isRegExp
- isSafeInteger
- isString
- isSymbol
- isTypedArray
- isUndefined
- lt
- lte
- startsWith
These functions mutate strings:
- camelCase
- capitalize
- deburr
- escape
- escapeRegExp
- kebabCase
- lowerCase
- lowerFirst
- pad
- padEnd
- padStart
- parseInt
- repeat
- replace
- snakeCase
- split
- startCase
- template
- toLower
- toUpper
- trim
- trimEnd
- trimStart
- truncate
- unescape
- upperCase
- upperFirst
- words
npm install
npm test
- lodash: Lodash modular utilities.
- chai: BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
- cheerio: Tiny, fast, and elegant implementation of core jQuery designed specifically for the server
- handlebars: Handlebars provides the power necessary to let you build semantic templates effectively with no frustration
- mocha: simple, flexible, fun test framework
- snazzy: Format JavaScript Standard Style as Stylish (i.e. snazzy) output
MIT
Generated by package-json-to-readme