{"_id":"useful-handlebars-helpers","_rev":"1-457c43d626ba19fa4b80a7b73dc94213","name":"useful-handlebars-helpers","dist-tags":{"latest":"0.12.0"},"versions":{"0.12.0":{"name":"useful-handlebars-helpers","description":"More than 150 Handlebars helpers in 17 categories. Works in browsers and in Node.js.","version":"0.12.0","homepage":"https://github.com/wirechunk/handlebars-helpers","contributors":[{"name":"Adrián Mugnolo","url":"https://github.com/xymbol"},{"name":"Aleš Kotnik","url":"www.draagle.com"},{"name":"Alex Hunt","url":"https://alexhunt.io"},{"name":"Ali Sheehan-Dare","url":"https://github.com/alisd23"},{"name":"Anders D. Johnson","url":"https://andrz.me"},{"name":"Arthur Cinader","url":"http://github.com/acinader"},{"name":"Brian Woodward","url":"https://twitter.com/doowb"},{"name":"Dan Dascalescu","url":"http://dandascalescu.com"},{"name":"Dan Gorby","url":"https://plus.google.com/+GreenRaccoon23"},{"name":"Dane Petersen","url":"https://thegreatsunra.com"},{"name":"Daniel Wabyick","url":"https://github.com/dwabyick"},{"name":"Dennis Borisevich","url":"https://github.com/DenSpirit"},{"name":"Dmitriy Cherchenko","url":"https://github.com/dchenk"},{"name":"Foundy","url":"http://foundy.io"},{"name":"GONZO","url":"https://github.com/why2pac"},{"name":"GracefulLight","url":"https://brendaniel.github.io"},{"name":"Hariadi Hinta","url":"http://www.hariadi.org"},{"name":"James Tsuyuki","url":"https://github.com/jtsuyuki"},{"name":"Jan Stola","url":"https://github.com/iamstolis"},{"name":"Jason Bellamy","url":"http://jasonbellamy.com"},{"name":"Jeffrey Froom","url":"http://jfroom.com"},{"name":"Jocelyn Badgley","url":"http://www.chipersoft.com"},{"name":"Joey Baker","url":"https://www.byjoeybaker.com"},{"name":"Jon Schlinkert","url":"http://twitter.com/jonschlinkert"},{"name":"Kevin Davis","url":"kevindav.us"},{"name":"Laurent Goderre","url":"https://github.com/LaurentGoderre"},{"name":"Liam Moat","url":"http://www.liammoat.com"},{"name":"Makoto Tateno","url":"https://github.com/makotot"},{"name":"Marie Hogebrandt","url":"http://mariehogebrandt.se"},{"name":"Mark Perkins","url":"http://allmarkedup.com"},{"name":"Martyn Rushton","url":"http://swapnull.co.uk"},{"name":"Max Albrecht","url":"178.is"},{"name":"Michael Sheedy","url":"michaelsheedy.com"},{"name":"Mikko Tapionlinna","url":"http://mikko.tapionlinna.fi"},{"name":"Nathan Jessen","url":"http://nathanjessen.github.io"},{"name":"Nathaniel Furniss","url":"https://github.com/nlfurniss"},{"name":"Oleg Orlov","url":"https://github.com/efender"},{"name":"Omesh","url":"https://github.com/omeshp"},{"name":"Patrick Burtchaell","url":"https://pburtchaell.com"},{"name":"Paul Welsh","url":"paulwelsh.info"},{"name":"Raymond Camden","url":"https://www.raymondcamden.com"},{"name":"Rob","url":"https://github.com/robsilva"},{"name":"Sam Tiffin","url":"https://samtiffin.com"},{"name":"Shannon Moeller","url":"http://shannonmoeller.com"},{"name":"Spud Hsu","url":"http://spud.in"},{"name":"Stephen Way","url":"http://stephenway.net"},{"name":"Thomas Jaggi","url":"http://responsive.ch"},{"name":"Tim Douglas","url":"https://github.com/timdouglas"},{"url":"https://github.com/homersimpsons"}],"repository":{"type":"git","url":"git+https://github.com/wirechunk/handlebars-helpers.git"},"bugs":{"url":"https://github.com/wirechunk/handlebars-helpers/issues"},"license":"MIT","main":"index.js","engines":{"node":">=0.16.0"},"scripts":{"lint":"eslint --fix .","test":"mocha"},"dependencies":{"get-object":"^0.2.0","get-value":"^2.0.6","handlebars-utils":"^1.0.6","has-value":"^1.0.0","html-tag":"^2.0.0","is-even":"^1.0.0","kind-of":"^6.0.0","lodash":"^4.17.21","path-browserify":"^1.0.1","remarkable":"^2.0.1","striptags":"^3.1.0"},"peerDependencies":{"handlebars":"^4.7.7","highlight.js":"^11.4.0"},"devDependencies":{"engine-handlebars":"^0.8.2","eslint":"^8.8.0","global-modules":"^1.0.0","mocha":"^3.5.2","templates":"^1.2.9"},"keywords":["array","collection","comparison","date","handlebars","handlebars.js","helper","helpers","html","i18n","inflection","log","logging","markdown","math","number","object","path","regex","string","template","time","url","util","utility"],"types":"./index.d.ts","gitHead":"d9fdc21db7d55be2e102d61843540bd6c86e5a75","_id":"useful-handlebars-helpers@0.12.0","_nodeVersion":"17.1.0","_npmVersion":"8.1.2","dist":{"integrity":"sha512-5YcT/QGPXUtre2ahJfxdIrFKY6ggi9QftkDC0A7LvaoTHu6o3CNkarITbBNvn7eAuf7w8KdH5Db+OF6aHrRAig==","shasum":"009af8122cf9353546640cdb787600a8afa538b5","tarball":"https://registry.npmjs.org/useful-handlebars-helpers/-/useful-handlebars-helpers-0.12.0.tgz","fileCount":31,"unpackedSize":164969,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+HyRCRA9TVsSAnZWagAAGLUQAIV+pPH6qm2vWnOiacXM\nEcTcFDlWk88wyYCgfSEs9HlaTpm0q/Q5ytFYRNCjRcBxVwUWvh++p9+DckZR\n5vNh8tCv7V4QFkxI1cBhhNGEjz43DdWLnCp6LK+oRTujuAKEuYBeEMdSEb54\nzKtQQgunIYENNFl79VJu6d7/8LYRHjkcmRPKrwqnZ1tlGrz24CotwEUbCdn5\nn1WU4hqK0KuGZnLGbO/7ajZ9n6Qyz3mWpDfaz1H7aGL5gJTJgHKoBu6yzqUN\nDK8+a3gEeSotf85tPuxy1SlcHuL1a67Tpkk0DN+HKQjhL62BrRxK/ZHBmMGQ\nHLFrlPnFp1Az4ZntSkYcju1BYWLPsgjjuTj2snHA/TC9jWptN1SuxoldF8OQ\nSLYZ0dpn73wbbtblzxSNwYCDIm9jHg77WHsQ8x/Pwp6lnNGKujoUm4OQP8Ct\nLhaauELsCYOuwCJTdeYLWw2jGfq3cvs70uUe9hMbez4/C5tObE+fIwrEeeC7\nyCXMwWUXWDwDwX1hWIBzRYn6ggcU7Vu/J9mdBYYvBVz2AS06dxP9OnfdOrrE\nmld5/dSVHFkMNRfa9P3NuKZMdlzjvQHyNkfT+o+tNr/EYXwnvD/ub25oPnfI\nUuO17/HkJfcXBObe1gQRlBLmMcwhg9PLP2akMGQfZsPigZQkm68PPFIMrDdr\n6zUV\r\n=793I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHHHdgX6hghdiYrEYatYsA/0VM35DOc0jewQabINhtouAiEA8qzIvsr1B93EUXF0JQQm4EI84xRg+r0SuAlrMFlMae4="}]},"_npmUser":{"name":"widerwebs","email":"opensource@widerwebs.com"},"directories":{},"maintainers":[{"name":"widerwebs","email":"opensource@widerwebs.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/useful-handlebars-helpers_0.12.0_1643674769832_0.28604728278612823"},"_hasShrinkwrap":false}},"time":{"created":"2022-02-01T00:19:29.831Z","0.12.0":"2022-02-01T00:19:29.967Z","modified":"2022-05-22T22:57:33.607Z"},"maintainers":[{"name":"widerwebs","email":"opensource@widerwebs.com"}],"description":"More than 150 Handlebars helpers in 17 categories. Works in browsers and in Node.js.","homepage":"https://github.com/wirechunk/handlebars-helpers","keywords":["array","collection","comparison","date","handlebars","handlebars.js","helper","helpers","html","i18n","inflection","log","logging","markdown","math","number","object","path","regex","string","template","time","url","util","utility"],"repository":{"type":"git","url":"git+https://github.com/wirechunk/handlebars-helpers.git"},"contributors":[{"name":"Adrián Mugnolo","url":"https://github.com/xymbol"},{"name":"Aleš Kotnik","url":"www.draagle.com"},{"name":"Alex Hunt","url":"https://alexhunt.io"},{"name":"Ali Sheehan-Dare","url":"https://github.com/alisd23"},{"name":"Anders D. Johnson","url":"https://andrz.me"},{"name":"Arthur Cinader","url":"http://github.com/acinader"},{"name":"Brian Woodward","url":"https://twitter.com/doowb"},{"name":"Dan Dascalescu","url":"http://dandascalescu.com"},{"name":"Dan Gorby","url":"https://plus.google.com/+GreenRaccoon23"},{"name":"Dane Petersen","url":"https://thegreatsunra.com"},{"name":"Daniel Wabyick","url":"https://github.com/dwabyick"},{"name":"Dennis Borisevich","url":"https://github.com/DenSpirit"},{"name":"Dmitriy Cherchenko","url":"https://github.com/dchenk"},{"name":"Foundy","url":"http://foundy.io"},{"name":"GONZO","url":"https://github.com/why2pac"},{"name":"GracefulLight","url":"https://brendaniel.github.io"},{"name":"Hariadi Hinta","url":"http://www.hariadi.org"},{"name":"James Tsuyuki","url":"https://github.com/jtsuyuki"},{"name":"Jan Stola","url":"https://github.com/iamstolis"},{"name":"Jason Bellamy","url":"http://jasonbellamy.com"},{"name":"Jeffrey Froom","url":"http://jfroom.com"},{"name":"Jocelyn Badgley","url":"http://www.chipersoft.com"},{"name":"Joey Baker","url":"https://www.byjoeybaker.com"},{"name":"Jon Schlinkert","url":"http://twitter.com/jonschlinkert"},{"name":"Kevin Davis","url":"kevindav.us"},{"name":"Laurent Goderre","url":"https://github.com/LaurentGoderre"},{"name":"Liam Moat","url":"http://www.liammoat.com"},{"name":"Makoto Tateno","url":"https://github.com/makotot"},{"name":"Marie Hogebrandt","url":"http://mariehogebrandt.se"},{"name":"Mark Perkins","url":"http://allmarkedup.com"},{"name":"Martyn Rushton","url":"http://swapnull.co.uk"},{"name":"Max Albrecht","url":"178.is"},{"name":"Michael Sheedy","url":"michaelsheedy.com"},{"name":"Mikko Tapionlinna","url":"http://mikko.tapionlinna.fi"},{"name":"Nathan Jessen","url":"http://nathanjessen.github.io"},{"name":"Nathaniel Furniss","url":"https://github.com/nlfurniss"},{"name":"Oleg Orlov","url":"https://github.com/efender"},{"name":"Omesh","url":"https://github.com/omeshp"},{"name":"Patrick Burtchaell","url":"https://pburtchaell.com"},{"name":"Paul Welsh","url":"paulwelsh.info"},{"name":"Raymond Camden","url":"https://www.raymondcamden.com"},{"name":"Rob","url":"https://github.com/robsilva"},{"name":"Sam Tiffin","url":"https://samtiffin.com"},{"name":"Shannon Moeller","url":"http://shannonmoeller.com"},{"name":"Spud Hsu","url":"http://spud.in"},{"name":"Stephen Way","url":"http://stephenway.net"},{"name":"Thomas Jaggi","url":"http://responsive.ch"},{"name":"Tim Douglas","url":"https://github.com/timdouglas"},{"url":"https://github.com/homersimpsons"}],"bugs":{"url":"https://github.com/wirechunk/handlebars-helpers/issues"},"license":"MIT","readme":"# handlebars-helpers\n<!-- {% raw %} -->\n\n> Tons of awesome helpers for Handlebars\n\nThis library is used for templates in [Wirechunk](https://wirechunk.com).\n\n## Browsers are supported\n\nThough this is a fork of [helpers/handlebars-helpers](https://github.com/helpers/handlebars-helpers), this package\nonly has helpers that work both in Node.js and in browsers.\n\nSee how to [use handlebars-helpers in the browser](https://github.com/doowb/handlebars-helpers-browserify-example).\n\n## Usage\n\nInstall this library:\n\n```\nnpm install useful-handlebars-helpers\n```\n\nThe main file (`index.js`) exports groups of helpers. See it for a list of all the groups.\n\nImport the groups you want and register each as a helper:\n\n```js\nimport handlebars from 'handlebars';\nimport { array, collection, math, number } from 'useful-handlebars-helpers';\n\n[array, collection, math, number].forEach(\n  (helper) => {\n    Handlebars.registerHelper(helper);\n  },\n);\n```\n\nYou need to have Handlebars as a dependency yourself: it is declared as a peer dependency here.\n\nAlso, if you use syntax highlighting when rendering Markdown to HTML with the `helper-markdown` module, you\nneed to have highlight.js as a dependency yourself; it too is a peer dependency here.\n\n## Helper categories\n\nCurrently **150 helpers** in **17 categories**:\n\n* **[array](#array)** ([code](lib/array.js) | [unit tests](test/array.js))\n* **[code](#code)** ([code](lib/code.js) | [unit tests](test/code.js))\n* **[collection](#collection)** ([code](lib/collection.js) | [unit tests](test/collection.js))\n* **[comparison](#comparison)** ([code](lib/comparison.js) | [unit tests](test/comparison.js))\n* **[date](#date)** ([code](lib/date.js) | [unit tests](test/date.js))\n* **[html](#html)** ([code](lib/html.js) | [unit tests](test/html.js))\n* **[i18n](#internationalization)** ([code](lib/i18n.js) | [unit tests](test/i18n.js))\n* **[inflection](#inflection)** ([code](lib/inflection.js) | [unit tests](test/inflection.js))\n* **[markdown](#markdown)** ([code](lib/markdown.js) | [unit tests](test/markdown.js))\n* **[math](#math)** ([code](lib/math.js) | [unit tests](test/math.js))\n* **[misc](#misc)** ([code](lib/misc.js) | [unit tests](test/misc.js))\n* **[number](#number)** ([code](lib/number.js) | [unit tests](test/number.js))\n* **[object](#object)** ([code](lib/object.js) | [unit tests](test/object.js))\n* **[path](#path)** ([code](lib/path.js) | [unit tests](test/path.js))\n* **[regex](#regex)** ([code](lib/regex.js) | [unit tests](test/regex.js))\n* **[string](#string)** ([code](lib/string.js) | [unit tests](test/string.js))\n* **[url](#url)** ([code](lib/url.js) | [unit tests](test/url.js))\n\n## All helpers\n\n### Array helpers\n\nVisit the: [code](lib/array.js) | [unit tests](test/array.js) | [issues](https://github.com/wirechunk/handlebars-helpers/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+array)\n\n* **[after](#after)** ([code](lib/array.js) | [tests](test/array.js))\n* **[eachIndex](#eachindex)** ([code](lib/array.js) | [tests](test/array.js))\n* **[filter](#filter)** ([code](lib/array.js) | [tests](test/array.js))\n* **[first](#first)** ([code](lib/array.js) | [tests](test/array.js))\n* **[forEach](#foreach)** ([code](lib/array.js) | [tests](test/array.js))\n* **[hasLength](#haslength)** ([code](lib/array.js) | [tests](test/array.js))\n* **[inArray](#inarray)** ([code](lib/array.js) | [tests](test/array.js))\n* **[isArray](#isarray)** ([code](lib/array.js) | [tests](test/array.js))\n* **[itemAt](#itemat)** ([code](lib/array.js) | [tests](test/array.js))\n* **[join](#join)** ([code](lib/array.js) | [tests](test/array.js))\n* **[last](#last)** ([code](lib/array.js) | [tests](test/array.js))\n* **[length](#length)** ([code](lib/array.js) | [tests](test/array.js))\n* **[map](#map)** ([code](lib/array.js) | [tests](test/array.js))\n* **[pluck](#pluck)** ([code](lib/array.js) | [tests](test/array.js))\n* **[reverse](#reverse)** ([code](lib/array.js) | [tests](test/array.js))\n* **[some](#some)** ([code](lib/array.js) | [tests](test/array.js))\n* **[sort](#sort)** ([code](lib/array.js) | [tests](test/array.js))\n* **[sortBy](#sortby)** ([code](lib/array.js) | [tests](test/array.js))\n* **[toArray](#toarray)** ([code](lib/array.js) | [tests](test/array.js))\n* **[withAfter](#withafter)** ([code](lib/array.js) | [tests](test/array.js))\n* **[withFirst](#withfirst)** ([code](lib/array.js) | [tests](test/array.js))\n* **[withGroup](#withgroup)** ([code](lib/array.js) | [tests](test/array.js))\n* **[withLast](#withlast)** ([code](lib/array.js) | [tests](test/array.js))\n* **[withSort](#withsort)** ([code](lib/array.js) | [tests](test/array.js))\n* **[union](#union)** ([code](lib/array.js) | [tests](test/array.js))\n* **[unique](#unique)** ([code](lib/array.js) | [tests](test/array.js))\n* **[uniqueBy](#uniqueby)** ([code](lib/array.js) | [tests](test/array.js))\n\n### Code helpers\n\nVisit the: [code](lib/code.js) | [unit tests](test/code.js) | [issues](https://github.com/wirechunk/handlebars-helpers/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+code)\n\n* **[gist](#gist)** ([code](lib/code.js) | [tests](test/code.js))\n* **[jsfiddle](#jsfiddle)** ([code](lib/code.js) | [tests](test/code.js))\n\n### Collection helpers\n\nVisit the: [code](lib/collection.js) | [unit tests](test/collection.js) | [issues](https://github.com/wirechunk/handlebars-helpers/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+collection)\n\n* **[isEmpty](#isempty)** ([code](lib/collection.js) | [tests](test/collection.js))\n* **[iterate](#iterate)** ([code](lib/collection.js) | [tests](test/collection.js))\n\n### Comparison helpers\n\nVisit the: [code](lib/comparison.js) | [unit tests](test/comparison.js) | [issues](https://github.com/wirechunk/handlebars-helpers/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+comparison)\n\n* **[and](#and)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n* **[compare](#compare)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n* **[contains](#contains)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n* **[default](#default)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n* **[eq](#eq)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n* **[gt](#gt)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n* **[gte](#gte)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n* **[has](#has)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n* **[isTruthy](#istruthy)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n* **[ifEven](#ifeven)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n* **[ifNth](#ifnth)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n* **[ifOdd](#ifodd)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n* **[is](#is)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n* **[isnt](#isnt)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n* **[lt](#lt)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n* **[lte](#lte)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n* **[neither](#neither)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n* **[not](#not)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n* **[or](#or)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n* **[unlessEq](#unlesseq)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n* **[unlessGt](#unlessgt)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n* **[unlessLt](#unlesslt)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n* **[unlessGteq](#unlessgteq)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n* **[unlessLteq](#unlesslteq)** ([code](lib/comparison.js) | [tests](test/comparison.js))\n\n### Date helpers\n\nVisit the: [code](lib/date.js) | [unit tests](test/date.js) | [issues](https://github.com/wirechunk/handlebars-helpers/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+date)\n\n* **[year](#year)** ([code](lib/date.js) | [tests](test/date.js))\n\n### HTML helpers\n\nVisit the: [code](lib/html.js) | [unit tests](test/html.js) | [issues](https://github.com/wirechunk/handlebars-helpers/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+html)\n\n* **[attr](#attr)** ([code](lib/html.js) | [tests](test/html.js))\n* **[css](#css)** ([code](lib/html.js) | [tests](test/html.js))\n* **[js](#js)** ([code](lib/html.js) | [tests](test/html.js))\n* **[sanitize](#sanitize)** ([code](lib/html.js) | [tests](test/html.js))\n* **[ul](#ul)** ([code](lib/html.js) | [tests](test/html.js))\n* **[ol](#ol)** ([code](lib/html.js) | [tests](test/html.js))\n* **[thumbnailImage](#thumbnailimage)** ([code](lib/html.js) | [tests](test/html.js))\n\n### Internationalization helpers\n\nVisit the: [code](lib/i18n.js) | [unit tests](test/i18n.js) | [issues](https://github.com/wirechunk/handlebars-helpers/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+i18n)\n\n* **[i18n](#i18n)** ([code](lib/i18n.js) | [tests](test/i18n.js))\n\n### Inflection helpers\n\nVisit the: [code](lib/inflection.js) | [unit tests](test/inflection.js) | [issues](https://github.com/wirechunk/handlebars-helpers/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+inflection)\n\n* **[inflect](#inflect)** ([code](lib/inflection.js) | [tests](test/inflection.js))\n* **[ordinalize](#ordinalize)** ([code](lib/inflection.js) | [tests](test/inflection.js))\n\n### Markdown helpers\n\nVisit the: [code](lib/markdown.js) | [unit tests](test/markdown.js) | [issues](https://github.com/wirechunk/handlebars-helpers/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+markdown)\n\n* **[markdownToHTML](#markdowntohtml)** ([code](lib/markdown.js) | [tests](test/markdown.js))\n\n### Math helpers\n\nVisit the: [code](lib/math.js) | [unit tests](test/math.js) | [issues](https://github.com/wirechunk/handlebars-helpers/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+math)\n\n* **[abs](#abs)** ([code](lib/math.js) | [no tests])\n* **[add](#add)** ([code](lib/math.js) | [tests](test/math.js))\n* **[avg](#avg)** ([code](lib/math.js) | [no tests])\n* **[ceil](#ceil)** ([code](lib/math.js) | [tests](test/math.js))\n* **[divide](#divide)** ([code](lib/math.js) | [tests](test/math.js))\n* **[floor](#floor)** ([code](lib/math.js) | [tests](test/math.js))\n* **[multiply](#multiply)** ([code](lib/math.js) | [tests](test/math.js))\n* **[random](#random)** ([code](lib/math.js) | [tests](test/math.js))\n* **[remainder](#remainder)** ([code](lib/math.js) | [tests](test/math.js))\n* **[round](#round)** ([code](lib/math.js) | [tests](test/math.js))\n* **[subtract](#subtract)** ([code](lib/math.js) | [tests](test/math.js))\n* **[sum](#sum)** ([code](lib/math.js) | [tests](test/math.js))\n\n### Misc helpers\n\nVisit the: [code](lib/misc.js) | [unit tests](test/misc.js) | [issues](https://github.com/wirechunk/handlebars-helpers/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+misc)\n\n* **[option](#option)** ([code](lib/misc.js) | [tests](test/misc.js))\n* **[noop](#noop)** ([code](lib/misc.js) | [tests](test/misc.js))\n* **[typeOf](#typeof)** ([code](lib/misc.js) | [no tests])\n* **[withHash](#withhash)** ([code](lib/misc.js) | [tests](test/misc.js))\n\n### Number helpers\n\nVisit the: [code](lib/number.js) | [unit tests](test/number.js) | [issues](https://github.com/wirechunk/handlebars-helpers/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+number)\n\n* **[bytes](#bytes)** ([code](lib/number.js) | [tests](test/number.js))\n* **[addCommas](#addcommas)** ([code](lib/number.js) | [tests](test/number.js))\n* **[phoneNumber](#phonenumber)** ([code](lib/number.js) | [tests](test/number.js))\n* **[toAbbr](#toabbr)** ([code](lib/number.js) | [tests](test/number.js))\n* **[toExponential](#toexponential)** ([code](lib/number.js) | [tests](test/number.js))\n* **[toFixed](#tofixed)** ([code](lib/number.js) | [tests](test/number.js))\n* **[toFloat](#tofloat)** ([code](lib/number.js) | [tests](test/number.js))\n* **[toInt](#toint)** ([code](lib/number.js) | [tests](test/number.js))\n* **[toPrecision](#toprecision)** ([code](lib/number.js) | [tests](test/number.js))\n\n### Object helpers\n\nVisit the: [code](lib/object.js) | [unit tests](test/object.js) | [issues](https://github.com/wirechunk/handlebars-helpers/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+object)\n\n* **[extend](#extend)** ([code](lib/object.js) | [tests](test/object.js))\n* **[forIn](#forIn)** ([code](lib/object.js) | [tests](test/object.js))\n* **[forOwn](#forOwn)** ([code](lib/object.js) | [tests](test/object.js))\n* **[toPath](#toPath)** ([code](lib/object.js) | [tests](test/object.js))\n* **[get](#get)** ([code](lib/object.js) | [tests](test/object.js))\n* **[getObject](#getObject)** ([code](lib/object.js) | [tests](test/object.js))\n* **[hasOwn](#hasOwn)** ([code](lib/object.js) | [tests](test/object.js))\n* **[isObject](#isobject)** ([code](lib/object.js) | [tests](test/object.js))\n* **[JSONparse](#jsonparse)** ([code](lib/object.js) | [tests](test/object.js))\n* **[JSONstringify](#jsonstringify)** ([code](lib/object.js) | [tests](test/object.js))\n* **[merge](#merge)** ([code](lib/object.js) | [tests](test/object.js))\n* **[pick](#pick)** ([code](lib/object.js) | [tests](test/object.js))\n\n### Path helpers\n\nVisit the: [code](lib/path.js) | [unit tests](test/path.js) | [issues](https://github.com/wirechunk/handlebars-helpers/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+path)\n\n* **[dirname](#dirname)** ([code](lib/path.js) | [tests](test/path.js))\n* **[relative](#relative)** ([code](lib/path.js) | [tests](test/path.js))\n* **[basename](#basename)** ([code](lib/path.js) | [tests](test/path.js))\n* **[stem](#stem)** ([code](lib/path.js) | [tests](test/path.js))\n* **[extname](#extname)** ([code](lib/path.js) | [tests](test/path.js))\n* **[segments](#segments)** ([code](lib/path.js) | [tests](test/path.js))\n\n### Regex helpers\n\nVisit the: [code](lib/regex.js) | [unit tests](test/regex.js) | [issues](https://github.com/wirechunk/handlebars-helpers/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+regex)\n\n* **[toRegex](#toRegex)** ([code](lib/regex.js) | [no tests])\n* **[test](#test)** ([code](lib/regex.js) | [no tests])\n\n### String helpers\n\nVisit the: [code](lib/string.js) | [unit tests](test/string.js) | [issues](https://github.com/wirechunk/handlebars-helpers/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+string)\n\n* **[append](#append)** ([code](lib/string.js) | [no tests])\n* **[camelcase](#camelcase)** ([code](lib/string.js) | [tests](test/string.js))\n* **[capitalize](#capitalize)** ([code](lib/string.js) | [tests](test/string.js))\n* **[capitalizeAll](#capitalizeAll)** ([code](lib/string.js) | [tests](test/string.js))\n* **[center](#center)** ([code](lib/string.js) | [tests](test/string.js))\n* **[chop](#chop)** ([code](lib/string.js) | [tests](test/string.js))\n* **[dashcase](#dashcase)** ([code](lib/string.js) | [tests](test/string.js))\n* **[dotcase](#dotcase)** ([code](lib/string.js) | [tests](test/string.js))\n* **[ellipsis](#ellipsis)** ([code](lib/string.js) | [tests](test/string.js))\n* **[hyphenate](#hyphenate)** ([code](lib/string.js) | [tests](test/string.js))\n* **[isString](#isString)** ([code](lib/string.js) | [tests](test/string.js))\n* **[lowercase](#lowercase)** ([code](lib/string.js) | [tests](test/string.js))\n* **[occurrences](#occurrences)** ([code](lib/string.js) | [tests](test/string.js))\n* **[pascalcase](#pascalcase)** ([code](lib/string.js) | [tests](test/string.js))\n* **[pathcase](#pathcase)** ([code](lib/string.js) | [tests](test/string.js))\n* **[plusify](#plusify)** ([code](lib/string.js) | [tests](test/string.js))\n* **[prepend](#prepend)** ([code](lib/string.js) | [no tests])\n* **[raw](#raw)** ([code](lib/string.js) | [no tests])\n* **[remove](#remove)** ([code](lib/string.js) | [no tests])\n* **[removeFirst](#removeFirst)** ([code](lib/string.js) | [no tests])\n* **[replace](#replace)** ([code](lib/string.js) | [tests](test/string.js))\n* **[replaceFirst](#replaceFirst)** ([code](lib/string.js) | [no tests])\n* **[sentence](#sentence)** ([code](lib/string.js) | [tests](test/string.js))\n* **[snakecase](#snakecase)** ([code](lib/string.js) | [tests](test/string.js))\n* **[split](#split)** ([code](lib/string.js) | [tests](test/string.js))\n* **[startsWith](#startsWith)** ([code](lib/string.js) | [tests](test/string.js))\n* **[titleize](#titleize)** ([code](lib/string.js) | [tests](test/string.js))\n* **[trim](#trim)** ([code](lib/string.js) | [tests](test/string.js))\n* **[trimLeft](#trimleft)** ([code](lib/string.js) | [no tests])\n* **[trimRight](#trimright)** ([code](lib/string.js) | [no tests])\n* **[truncate](#truncate)** ([code](lib/string.js) | [tests](test/string.js))\n* **[truncateWords](#truncatewords)** ([code](lib/string.js) | [no tests])\n* **[uppercase](#uppercase)** ([code](lib/string.js) | [tests](test/string.js))\n\n### URL helpers\n\nVisit the: [code](lib/url.js) | [unit tests](test/url.js) | [issues](https://github.com/wirechunk/handlebars-helpers/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+url)\n\n* **[decodeURIComponent](#decodeuricomponent)** ([code](lib/url.js) | [tests](test/url.js))\n* **[encodeURIComponent](#encodeuricomponent)** ([code](lib/url.js) | [tests](test/url.js))\n* **[urlResolve](#urlresolve)** ([code](lib/url.js) | [tests](test/url.js))\n* **[urlParse](#urlparse)** ([code](lib/url.js) | [tests](test/url.js))\n* **[stripQuerystring](#stripquerystring)** ([code](lib/url.js) | [tests](test/url.js))\n\n***\n\n## array\n\n### after\n\nReturns all of the items in an array, or characters in a string, after the specified index.\n\n**Params**\n\n* `array` **{Array|String}**: Collection\n* `n` **{Number}**: Starting index (number of items to exclude)\n* `returns` **{Array|String}**: Array or string excluding `n` items.\n\n**Example**\n\n```handlebars\n<!-- array: ['a', 'b', 'c'] -->\n{{after array 1}}\n<!-- results in: '[\"c\"]' -->\n\n<!-- str: \"abcd\" -->\n{{after str 2}}\n<!-- results in: 'cd' -->\n```\n\n### eachIndex\n\n**Params**\n\n* `array` **{Array}**\n* `options` **{Object}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n<!-- array: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'] -->\n{{#eachIndex array}}\n  {{item}} is {{index}}\n{{/eachIndex}}\n```\n\n### filter\n\nReturns an array with the given array's elements filtered for elements that equal a specified value\nor, if a hash argument with a \"property\" key is provided, for elements that have the specified\nproperty equal to a specified value.\n\n**Params**\n\n* `array` **{Array}**\n* `value` **{any}**\n* `options` **{Object}**\n* `returns` **{Array}**\n\n**Example**\n\n```handlebars\n<!-- array: ['a', 'b', 'a', 'c'] -->\n{{filter array \"a\"}}\n<!-- results in: ['a', 'a'] -->\n\n<!-- array: [{ x: 'a' }, { x: 'b' }, { x: 'a' }, { x: 'c' }] -->\n{{filter array \"a\" property=\"x\"}}\n<!-- results in: [{ x: 'a'}, { x: 'a' }] -->\n```\n\n### first\n\nReturns the first item, or first `n` items of an array.\n\n**Params**\n\n* `array` **{Array}**\n* `n` **{Number}**: Number of items to return, starting at `0`.\n* `returns` **{Array}**\n\n**Example**\n\n```handlebars\n{{first \"['a', 'b', 'c', 'd', 'e']\" 2}}\n<!-- results in: '[\"a\", \"b\"]' -->\n```\n\n### forEach\n\nIterates over each item in an array and exposes the current item in the array as context to the inner block. In addition to the current array item, the helper exposes the following variables to the inner block:\n\n* `index`\n* `total`\n* `isFirst`\n* `isLast`\nAlso, `@index` is exposed as a private variable, and additional\nprivate variables may be defined as hash arguments.\n\n**Params**\n\n* `array` **{Array}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n<!-- accounts = [\n{'name': 'John', 'email': 'john@example.com'},\n{'name': 'Malcolm', 'email': 'malcolm@example.com'},\n{'name': 'David', 'email': 'david@example.com'}\n] -->\n\n{{#forEach accounts}}\n  <a href=\"mailto:{{ email }}\" title=\"Send an email to {{ name }}\">\n    {{ name }}\n  </a>{{#unless isLast}}, {{/unless}}\n{{/forEach}}\n```\n\n### inArray\n\nBlock helper that renders the block if an array has the given `value`. Optionally specify an inverse block to render when the array does not have the given value.\n\n**Params**\n\n* `array` **{Array}**\n* `value` **{any}**\n* `options` **{Object}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n<!-- array: ['a', 'b', 'c'] -->\n{{#inArray array \"d\"}}\n  foo\n{{else}}\n  bar\n{{/inArray}}\n<!-- results in: 'bar' -->\n```\n\n### isArray\n\nReturns true if `value` is an es5 array.\n\n**Params**\n\n* `value` **{any}**: The value to test.\n* `returns` **{Boolean}**\n\n**Example**\n\n```handlebars\n{{isArray \"abc\"}}\n<!-- results in: false -->\n\n<!-- array: [1, 2, 3] -->\n{{isArray array}}\n<!-- results in: true -->\n```\n\n### itemAt\n\nReturns the item from `array` at index `idx`.\n\n**Params**\n\n* `array` **{Array}**\n* `idx` **{Number}**\n* `returns` **{any}** `value`\n\n**Example**\n\n```handlebars\n<!-- array: ['a', 'b', 'c'] -->\n{{itemAt array 1}}\n<!-- results in: 'b' -->\n```\n\n### join\n\nJoin all elements of array into a string, optionally using a given separator.\n\n**Params**\n\n* `array` **{Array}**\n* `separator` **{String}**: The separator to use. Defaults to `,`.\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n<!-- array: ['a', 'b', 'c'] -->\n{{join array}}\n<!-- results in: 'a, b, c' -->\n\n{{join array '-'}}\n<!-- results in: 'a-b-c' -->\n```\n\n### hasLength\n\nReturns true if the the length of the given `value` is equal\nto the given `length`. Can be used as a block or inline helper.\n\n**Params**\n\n* `value` **{Array|String}**\n* `length` **{Number}**\n* `options` **{Object}**\n* `returns` **{String}**\n\n### last\n\nReturns the last item, or last `n` items of an array or string. Opposite of [first](#first).\n\n**Params**\n\n* `value` **{Array|String}**: Array or string.\n* `n` **{Number}**: Number of items to return from the end of the array.\n* `returns` **{Array}**\n\n**Example**\n\n```handlebars\n<!-- var value = ['a', 'b', 'c', 'd', 'e'] -->\n\n{{last value}}\n<!-- results in: ['e'] -->\n\n{{last value 2}}\n<!-- results in: ['d', 'e'] -->\n\n{{last value 3}}\n<!-- results in: ['c', 'd', 'e'] -->\n```\n\n### length\n\nReturns the length of the given string or array.\n\n**Params**\n\n* `value` **{Array|Object|String}**\n* `returns` **{Number}**: The length of the value.\n\n**Example**\n\n```handlebars\n{{length '[\"a\", \"b\", \"c\"]'}}\n<!-- results in: 3 -->\n\n<!-- results in: myArray = ['a', 'b', 'c', 'd', 'e']; -->\n{{length myArray}}\n<!-- results in: 5 -->\n\n<!-- results in: myObject = {'a': 'a', 'b': 'b'}; -->\n{{length myObject}}\n<!-- results in: 2 -->\n```\n\n### map\n\nReturns a new array, created by calling `function` on each element of the given `array`. For example,\n\n**Params**\n\n* `array` **{Array}**\n* `fn` **{Function}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n<!-- array: ['a', 'b', 'c'], and \"double\" is a\nfictitious function that duplicates letters -->\n{{map array double}}\n<!-- results in: '[\"aa\", \"bb\", \"cc\"]' -->\n```\n\n### pluck\n\nMap over the given object or array or objects and create an array of values from the given `prop`. Dot-notation may be used (as a string) to get nested properties.\n\n**Params**\n\n* `collection` **{Array|Object}**\n* `prop` **{Function}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n// {{pluck items \"data.title\"}}\n<!-- results in: '[\"aa\", \"bb\", \"cc\"]' -->\n```\n\n### reverse\n\nReverse the elements in an array, or the characters in a string.\n\n**Params**\n\n* `value` **{Array|String}**\n* `returns` **{Array|String}**: Returns the reversed string or array.\n\n**Example**\n\n```handlebars\n<!-- value: 'abcd' -->\n{{reverse value}}\n<!-- results in: 'dcba' -->\n<!-- value: ['a', 'b', 'c', 'd'] -->\n{{reverse value}}\n<!-- results in: ['d', 'c', 'b', 'a'] -->\n```\n\n### some\n\nBlock helper that returns the block if the callback returns true for some value in the given array.\n\n**Params**\n\n* `array` **{Array}**\n* `iter` **{Function}**: Iteratee\n* **{Options}**: Handlebars provided options object\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n<!-- array: [1, 'b', 3] -->\n{{#some array isString}}\n  Render me if the array has a string.\n{{else}}\n  Render me if it doesn't.\n{{/some}}\n<!-- results in: 'Render me if the array has a string.' -->\n```\n\n### sort\n\nSort the given `array`. If an array of objects is passed, you may optionally pass a `key` to sort on as the second argument. You may alternatively pass a sorting function as the second argument.\n\n**Params**\n\n* `array` **{Array}**: the array to sort.\n* `key` **{String|Function}**: The object key to sort by, or sorting function.\n\n**Example**\n\n```handlebars\n<!-- array: ['b', 'a', 'c'] -->\n{{sort array}}\n<!-- results in: '[\"a\", \"b\", \"c\"]' -->\n```\n\n### sortBy\n\nSort an `array`. If an array of objects is passed, you may optionally pass a `key` to sort on as the second argument. You may alternatively pass a sorting function as the second argument.\n\n**Params**\n\n* `array` **{Array}**: the array to sort.\n* `props` **{String|Function}**: One or more properties to sort by, or sorting functions to use.\n\n**Example**\n\n```handlebars\n<!-- array: [{a: 'zzz'}, {a: 'aaa'}] -->\n{{sortBy array \"a\"}}\n<!-- results in: '[{\"a\":\"aaa\"}, {\"a\":\"zzz\"}]' -->\n```\n\n### toArray\n\nCombine the given values into an array.\n\n**Params**\n\n* `values` **{...any}**\n* `returns` **{Array}**\n\n**Example**\n\n```handlebars\n{{toArray \"foo\"}}\n<!-- results in: [ \"foo\" ] -->\n\n{{toArray \"foo\" \"bar\"}}\n<!-- results in: [ \"foo\", \"bar\" ] -->\n```\n\n### withAfter\n\nUse the items in the array _after_ the specified index as context inside a block.\n\n**Params**\n\n* `array` **{Array}**\n* `idx` **{Number}**\n* `options` **{Object}**\n* `returns` **{Array}**\n\n**Example**\n\n```handlebars\n<!-- array: ['a', 'b', 'c', 'd', 'e'] -->\n{{#withAfter array 3}}\n  {{this}}\n{{/withAfter}}\n<!-- results in: \"de\" -->\n```\n\n### withFirst\n\nUse the first item in a collection inside a handlebars block expression. Opposite of [withLast](#withLast).\n\n**Params**\n\n* `array` **{Array}**\n* `idx` **{Number}**\n* `options` **{Object}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n<!-- array: ['a', 'b', 'c'] -->\n{{#withFirst array}}\n  {{this}}\n{{/withFirst}}\n<!-- results in: 'a' -->\n```\n\n### withGroup\n\nBlock helper that groups array elements by given group `size`.\n\n**Params**\n\n* `array` **{Array}**: The array to iterate over\n* `size` **{Number}**: The desired length of each array \"group\"\n* `options` **{Object}**: Handlebars options\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n<!-- array: ['a','b','c','d','e','f','g','h'] -->\n{{#withGroup array 4}}\n  {{#each this}}\n    {{.}}\n  {{each}}\n  <br>\n{{/withGroup}}\n<!-- results in: -->\n<!-- 'a','b','c','d'<br> -->\n<!-- 'e','f','g','h'<br> -->\n```\n\n### withLast\n\nUse the last item or `n` items in an array as context inside a block. Opposite of [withFirst](#withFirst).\n\n**Params**\n\n* `array` **{Array}**\n* `idx` **{Number}**: The starting index.\n* `options` **{Object}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n<!-- array: ['a', 'b', 'c'] -->\n{{#withLast array}}\n  {{this}}\n{{/withLast}}\n<!-- results in: 'c' -->\n```\n\n### withSort\n\nBlock helper that sorts a collection and exposes the sorted collection as context inside the block.\n\n**Params**\n\n* `array` **{Array}**\n* `prop` **{String}**\n* `options` **{Object}**: Specify `reverse=\"true\"` to reverse the array.\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n<!-- array: ['b', 'a', 'c'] -->\n{{#withSort array}}{{this}}{{/withSort}}\n<!-- results in: 'abc' -->\n```\n\n### union\n\nReturns an array of all of the unique values from the two given arrays.\nElements are compared using [SameValueZero](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness),\nwhich is similar to strict equality except that NaN is considered equal to NaN.\n\n**Params**\n\n* `array1` **{Array}**\n* `array2` **{Array}**\n* `returns` **{Array}**\n\n**Example**\n\n```handlebars\n<!-- array1: ['a', 'a', 'c', 'b'], array2: ['a', 'b', 'e'] -->\n{{#each (unique array)}}{{.}}{{/each}}\n<!-- results in: 'acbe' -->\n```\n\n### unique\n\nReturns an array with all duplicate values removed.\nElements are compared using [SameValueZero](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness),\nwhich is similar to strict equality except that NaN is considered equal to NaN.\n\n**Params**\n\n* `array` **{Array}**\n* `options` **{Object}**\n* `returns` **{Array}**\n\n**Example**\n\n```handlebars\n<!-- array: ['a', 'a', 'c', 'b', 'e', 'e'] -->\n{{#each (unique array)}}{{.}}{{/each}}\n<!-- results in: 'acbe' -->\n```\n\n### uniqueBy\n\nReturns an array with all duplicate values removed using the property or comparison function specified.\n\n**Params**\n\n* `array` **{Array}**\n* `prop` **{String|Function}**: The property or comparison function by which to determine uniqueness.\n* `returns` **{Array}**\n\n**Example**\n\n```handlebars\n<!-- array: [{a: 'zz', id: 1}, {a: 'aa', id: 2}, {a: 'zz', id: 3}] -->\n{{uniqueBy array \"a\"}}\n<!-- results in: [{ a: \"zz\", id: 1}, { a: \"aa\", id: 2 }] -->\n```\n\n## code\n\n### gist\n\nEmbed a GitHub Gist using only the id of the Gist\n\n**Params**\n\n* `id` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{gist \"12345\"}}\n```\n\n### jsfiddle\n\nGenerate the HTML for a jsFiddle link with the given `params`\n\n**Params**\n\n* `params` **{Object}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{jsfiddle id=\"0dfk10ks\" tabs=\"true\"}}\n```\n\n## collection\n\n### isEmpty\n\nInline, subexpression, or block helper that returns true (or the block) if the given collection is empty, or false (or the inverse block, if supplied) if the colleciton is not empty.\n\n**Params**\n\n* `collection` **{Object}**\n* `options` **{Object}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n<!-- array: [] -->\n{{#isEmpty array}}AAA{{else}}BBB{{/isEmpty}}\n<!-- results in: 'AAA' -->\n\n<!-- array: [] -->\n{{isEmpty array}}\n<!-- results in: true -->\n```\n\n### iterate\n\nBlock helper that iterates over an array or object. If\nan array is given, `.forEach` is called, or if an object\nis given, `.forOwn` is called, otherwise the inverse block\nis returned.\n\n**Params**\n\n* `collection` **{Object|Array}**: The collection to iterate over\n* `options` **{Object}**\n* `returns` **{String}**\n\n## comparison\n\n### and\n\nHelper that renders the block if **both** of the given values are truthy. If an inverse block is specified it will be rendered when falsy. Works as a block helper, inline helper or subexpression.\n\n**Params**\n\n* `a` **{any}**\n* `b` **{any}**\n* `options` **{Object}**: Handlebars provided options object\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n<!-- {great: true, magnificent: true} -->\n{{#and great magnificent}}A{{else}}B{{/and}}\n<!-- results in: 'A' -->\n```\n\n### compare\n\nRender a block when a comparison of the first and third\narguments returns true. The second argument is\nthe [arithmetic operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators) to use. You may also\noptionally specify an inverse block to render when falsy.\n\n**Params**\n\n* `a` **{}**\n* `operator` **{}**: The operator to use. Operators must be enclosed in quotes: `\">\"`, `\"=\"`, `\"<=\"`, and so on.\n* `b` **{}**\n* `options` **{Object}**: Handlebars provided options object\n* `returns` **{String}**: Block, or if specified the inverse block is rendered if falsey.\n\n### contains\n\nBlock helper that renders the block if `collection` has the given `value`, using strict equality (`===`) for comparison, otherwise the inverse block is rendered (if specified). If a `startIndex` is specified and is negative, it is used as the offset from the end of the collection.\n\n**Params**\n\n* `collection` **{Array|Object|String}**: The collection to iterate over.\n* `value` **{any}**: The value to check for.\n* `[startIndex=0]` **{Number}**: Optionally define the starting index.\n* `options` **{Object}**: Handlebars provided options object.\n\n**Example**\n\n```handlebars\n<!-- array = ['a', 'b', 'c'] -->\n{{#contains array \"d\"}}\n  This will not be rendered.\n{{else}}\n  This will be rendered.\n{{/contains}}\n```\n\n### default\n\nReturns the first value that is not undefined, otherwise the \"default\" value is returned.\n\n**Params**\n\n* `value` **{any}**\n* `defaultValue` **{any}**\n* `returns` **{String}**\n\n### eq\n\nBlock helper that renders a block if `a` is **equal to** `b`.\nIf an inverse block is specified it will be rendered when falsy.\nYou may optionally use the `compare=\"\"` hash argument for the\nsecond value.\n\n**Params**\n\n* `a` **{String}**\n* `b` **{String}**\n* `options` **{Object}**: Handlebars provided options object\n* `returns` **{String}**: Block, or inverse block if specified and falsey.\n\n### gt\n\nBlock helper that renders a block if `a` is **greater than** `b`.\n\nIf an inverse block is specified it will be rendered when falsy.\nYou may optionally use the `compare=\"\"` hash argument for the\nsecond value.\n\n**Params**\n\n* `a` **{String}**\n* `b` **{String}**\n* `options` **{Object}**: Handlebars provided options object\n* `returns` **{String}**: Block, or inverse block if specified and falsey.\n\n### gte\n\nBlock helper that renders a block if `a` is **greater than or equal to** `b`.\n\nIf an inverse block is specified it will be rendered when falsy.\nYou may optionally use the `compare=\"\"` hash argument for the\nsecond value.\n\n**Params**\n\n* `a` **{String}**\n* `b` **{String}**\n* `options` **{Object}**: Handlebars provided options object\n* `returns` **{String}**: Block, or inverse block if specified and falsey.\n\n### has\n\nBlock helper that renders a block if `value` has `pattern`.\nIf an inverse block is specified it will be rendered when falsy.\n\n**Params**\n\n* `val` **{any}**: The value to check.\n* `pattern` **{any}**: The pattern to check for.\n* `options` **{Object}**: Handlebars provided options object\n* `returns` **{String}**\n\n### isTruthy\n\nReturns true if the given `value` is truthy.\n\n**Params**\n\n* `val` **{any}**\n* `options` **{Options}**\n* `returns` **{Boolean}**\n\n### ifEven\n\nReturn true if the given value is an even number.\n\n**Params**\n\n* `number` **{Number}**\n* `options` **{Object}**: Handlebars provided options object\n* `returns` **{String}**: Block, or inverse block if specified and falsey.\n\n**Example**\n\n```handlebars\n{{#ifEven value}}\n  render A\n{{else}}\n  render B\n{{/ifEven}}\n```\n\n### ifNth\n\nConditionally renders a block if the remainder is zero when\n`a` operand is divided by `b`. If an inverse block is specified\nit will be rendered when the remainder is **not zero**.\n\n**Params**\n\n* **{}**: {Number}\n* **{}**: {Number}\n* `options` **{Object}**: Handlebars provided options object\n* `returns` **{String}**: Block, or inverse block if specified and falsey.\n\n### ifOdd\n\nBlock helper that renders a block if `value` is **an odd number**. If an inverse block is specified it will be rendered when falsy.\n\n**Params**\n\n* `value` **{Object}**\n* `options` **{Object}**: Handlebars provided options object\n* `returns` **{String}**: Block, or inverse block if specified and falsey.\n\n**Example**\n\n```handlebars\n{{#ifOdd value}}\n  render A\n{{else}}\n  render B\n{{/ifOdd}}\n```\n\n### is\n\nBlock helper that renders a block if `a` is **equal to** `b`.\nIf an inverse block is specified it will be rendered when falsy.\nSimilar to [eq](#eq) but does not do strict equality.\n\n**Params**\n\n* `a` **{any}**\n* `b` **{any}**\n* `options` **{Object}**: Handlebars provided options object\n* `returns` **{String}**\n\n### isnt\n\nBlock helper that renders a block if `a` is **not equal to** `b`.\nIf an inverse block is specified it will be rendered when falsy.\nSimilar to [unlessEq](#unlesseq) but does not use strict equality for\ncomparisons.\n\n**Params**\n\n* `a` **{String}**\n* `b` **{String}**\n* `options` **{Object}**: Handlebars provided options object\n* `returns` **{String}**\n\n### lt\n\nBlock helper that renders a block if `a` is **less than** `b`.\n\nIf an inverse block is specified it will be rendered when falsy.\nYou may optionally use the `compare=\"\"` hash argument for the\nsecond value.\n\n**Params**\n\n* `context` **{Object}**\n* `options` **{Object}**: Handlebars provided options object\n* `returns` **{String}**: Block, or inverse block if specified and falsey.\n\n### lte\n\nBlock helper that renders a block if `a` is **less than or equal to** `b`.\n\nIf an inverse block is specified it will be rendered when falsy.\nYou may optionally use the `compare=\"\"` hash argument for the\nsecond value.\n\n**Params**\n\n* `a` **{Sring}**\n* `b` **{Sring}**\n* `options` **{Object}**: Handlebars provided options object\n* `returns` **{String}**: Block, or inverse block if specified and falsey.\n\n### neither\n\nBlock helper that renders a block if **neither of** the given values\nare truthy. If an inverse block is specified it will be rendered\nwhen falsy.\n\n**Params**\n\n* `a` **{any}**\n* `b` **{any}**\n* `options` **{}**: Handlebars options object\n* `returns` **{String}**: Block, or inverse block if specified and falsey.\n\n### not\n\nReturns true if `val` is falsey. Works as a block or inline helper.\n\n**Params**\n\n* `val` **{String}**\n* `options` **{Object}**: Handlebars provided options object\n* `returns` **{String}**\n\n### or\n\nBlock helper that renders a block if **any of** the given values is truthy. If an inverse block is specified it will be rendered when falsy.\n\n**Params**\n\n* `arguments` **{...any}**: Variable number of arguments\n* `options` **{Object}**: Handlebars options object\n* `returns` **{String}**: Block, or inverse block if specified and falsey.\n\n**Example**\n\n```handlebars\n{{#or a b c}}\n  If any value is true this will be rendered.\n{{/or}}\n```\n\n### unlessEq\n\nBlock helper that always renders the inverse block **unless `a` is\nis equal to `b`**.\n\n**Params**\n\n* `a` **{String}**\n* `b` **{String}**\n* `options` **{Object}**: Handlebars provided options object\n* `returns` **{String}**: Inverse block by default, or block if falsey.\n\n### unlessGt\n\nBlock helper that always renders the inverse block **unless `a` is\nis greater than `b`**.\n\n**Params**\n\n* `a` **{Object}**: The default value\n* `b` **{Object}**: The value to compare\n* `options` **{Object}**: Handlebars provided options object\n* `returns` **{String}**: Inverse block by default, or block if falsey.\n\n### unlessLt\n\nBlock helper that always renders the inverse block **unless `a` is\nis less than `b`**.\n\n**Params**\n\n* `a` **{Object}**: The default value\n* `b` **{Object}**: The value to compare\n* `options` **{Object}**: Handlebars provided options object\n* `returns` **{String}**: Block, or inverse block if specified and falsey.\n\n### unlessGteq\n\nBlock helper that always renders the inverse block **unless `a` is\nis greater than or equal to `b`**.\n\n**Params**\n\n* `a` **{any}**\n* `b` **{any}**\n* `options` **{Object}**: Handlebars provided options object\n* `returns` **{String}**: Block, or inverse block if specified and falsey.\n\n### unlessLteq\n\nBlock helper that always renders the inverse block **unless `a` is\nis less than or equal to `b`**.\n\n**Params**\n\n* `a` **{any}**\n* `b` **{any}**\n* `options` **{Object}**: Handlebars provided options object\n* `returns` **{String}**: Block, or inverse block if specified and falsey.\n\n## date\n\n### year\n\nGet the current year.\n\n**Example**\n\n```handlebars\n{{year}}\n<!-- 2017 -->\n```\n\n## html\n\n### attr\n\nStringify attributes on the options `hash`.\n\n**Params**\n\n* `options` **{Object}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n<!-- value = 'bar' -->\n<div{{attr foo=value}}></div>\n<!-- results in: <div foo=\"bar\"></div>\n```\n\n### css\n\nAdd an array of `<link>` tags. Automatically resolves relative paths to `options.assets` if passed on the context.\n\n**Params**\n\n* `list` **{String|Array}**: One or more stylesheet urls.\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n<!-- {stylesheets: ['foo.css', 'bar.css']} -->\n{{css stylesheets}}\n\n<!-- results in: -->\n<!-- <link type=\"text/css\" rel=\"stylesheet\" href=\"foo.css\"> -->\n<!-- <link type=\"text/css\" rel=\"stylesheet\" href=\"bar.css\"> -->\n```\n\n### js\n\nGenerate one or more `<script></script>` tags with paths/urls to javascript or coffeescript files.\n\n**Params**\n\n* `context` **{Object}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{js scripts}}\n```\n\n### sanitize\n\nStrip HTML tags from a string, so that only the text nodes are preserved.\n\n**Params**\n\n* `str` **{String}**: The string of HTML to sanitize.\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{sanitize \"<span>foo</span>\"}}\n<!-- results in: 'foo' -->\n```\n\n### ul\n\nBlock helper for creating unordered lists (`<ul></ul>`)\n\n**Params**\n\n* `context` **{Object}**\n* `options` **{Object}**\n* `returns` **{String}**\n\n### ol\n\nBlock helper for creating ordered lists  (`<ol></ol>`)\n\n**Params**\n\n* `context` **{Object}**\n* `options` **{Object}**\n* `returns` **{String}**\n\n### thumbnailImage\n\nReturns a `<figure>` with a thumbnail linked to a full picture\n\n**Params**\n\n* `context` **{Object}**: Object with values/attributes to add to the generated elements:\n* `context.alt` **{String}**\n* `context.src` **{String}**\n* `context.width` **{Number}**\n* `context.height` **{Number}**\n* `returns` **{String}**: HTML `<figure>` element with image and optional caption/link.\n\n## internationalization\n\n### i18n\n\ni18n helper. See [button-i18n](https://github.com/assemble/buttons)\nfor a working example.\n\n**Params**\n\n* `key` **{String}**\n* `options` **{Object}**\n* `returns` **{String}**\n\n## inflection\n\n### inflect\n\nReturns either the `singular` or `plural` inflection of a word based on the given `count`.\n\n**Params**\n\n* `count` **{Number}**\n* `singular` **{String}**: The singular form\n* `plural` **{String}**: The plural form\n* `includeCount` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{inflect 0 \"string\" \"strings\"}}\n<!-- \"strings\" -->\n{{inflect 1 \"string\" \"strings\"}}\n<!-- \"string\" -->\n{{inflect 1 \"string\" \"strings\" true}}\n<!-- \"1 string\" -->\n{{inflect 2 \"string\" \"strings\"}}\n<!-- \"strings\" -->\n{{inflect 2 \"string\" \"strings\" true}}\n<!-- \"2 strings\" -->\n```\n\n### ordinalize\n\nReturns an ordinalized number as a string.\n\n**Params**\n\n* `val` **{String}**: The value to ordinalize.\n* `returns` **{String}**: The ordinalized number\n\n**Example**\n\n```handlebars\n{{ordinalize 1}}\n<!-- '1st' -->\n{{ordinalize 21}}\n<!-- '21st' -->\n{{ordinalize 29}}\n<!-- '29th' -->\n{{ordinalize 22}}\n<!-- '22nd' -->\n```\n\n## markdown\n\n### markdownToHTML\n\nBlock helper that converts a string of inline markdown to HTML.\n\n**Params**\n\n* `context` **{Object}**\n* `options` **{Object}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{#markdownToHTML}}\n# Foo\n\n> some quote\n{{/markdownToHTML}}\n<!-- results in:\n<h1>Foo</h1>\n<blockquote>\n<p>some quote</p>\n</blockquote>\n-->\n```\n\n## math\n\n### abs\n\nReturn the magnitude of `a`.\n\n**Params**\n\n* `a` **{Number}**\n* `returns` **{Number}**\n\n### add\n\nReturn the sum of `a` plus `b`.\n\n**Params**\n\n* `a` **{Number}**\n* `b` **{Number}**\n* `returns` **{Number}**\n\n### avg\n\nReturns the average of all numbers in the given array.\n\n**Params**\n\n* `array` **{Array}**: Array of numbers to add up.\n* `returns` **{Number}**\n\n**Example**\n\n```handlebars\n{{avg \"[1, 2, 3, 4, 5]\"}}\n<!-- results in: '3' -->\n```\n\n### ceil\n\nGet the `Math.ceil()` of the given value.\n\n**Params**\n\n* `value` **{Number}**\n* `returns` **{Number}**\n\n### divide\n\nDivide `a` by `b`\n\n**Params**\n\n* `a` **{Number}**: numerator\n* `b` **{Number}**: denominator\n\n### floor\n\nGet the `Math.floor()` of the given value.\n\n**Params**\n\n* `value` **{Number}**\n* `returns` **{Number}**\n\n### multiply\n\nReturn the product of `a` times `b`.\n\n**Params**\n\n* `a` **{Number}**: factor\n* `b` **{Number}**: multiplier\n* `returns` **{Number}**\n\n### random\n\nGenerate a random number between two values\n\n**Params**\n\n* `min` **{Number}**\n* `max` **{Number}**\n* `returns` **{Number}**\n\n### remainder\n\nGet the remainder of dividing `a` by `b`.\n\n**Params**\n\n* `a` **{Number}**\n* `b` **{Number}**\n* `returns` **{Number}**\n\n**Example**\n\n```handlebars\n{{remainder 7 5}}\n<!-- results in: 2 -->\n```\n\n### round\n\nRound the given number.\n\n**Params**\n\n* `number` **{Number}**\n* `returns` **{Number}**\n\n### subtract\n\nReturn the product of `a` minus `b`.\n\n**Params**\n\n* `a` **{Number}**\n* `b` **{Number}**\n* `returns` **{Number}**\n\n### sum\n\nReturns the sum of all numbers in the given array.\n\n**Params**\n\n* `array` **{Array}**: Array of numbers to add up.\n* `returns` **{Number}**\n\n**Example**\n\n```handlebars\n{{sum \"[1, 2, 3, 4, 5]\"}}\n<!-- results in: '15' -->\n```\n\n## misc\n\n### option\n\nReturn the given value of `prop` from `this.options`.\n\n**Params**\n\n* `prop` **{String}**\n* `returns` **{any}**\n\n**Example**\n\n```handlebars\n<!-- context = {options: {a: {b: {c: 'ddd'}}}} -->\n{{option \"a.b.c\"}}\n<!-- results => `ddd` -->\n```\n\n### noop\n\nBlock helper that renders the block without taking any arguments.\n\n**Params**\n\n* `options` **{Object}**\n* `returns` **{String}**\n\n### typeOf\n\nGet the native type of the given `value`\n\n**Params**\n\n* `value` **{any}**\n* `returns` **{String}**: Returns the type of value.\n\n**Example**\n\n```handlebars\n{{typeOf 1}}\n//=> 'number'\n{{typeOf \"1\"}}\n//=> 'string'\n{{typeOf \"foo\"}}\n//=> 'string'\n```\n\n### withHash\n\nBlock helper that builds the context for the block\nfrom the options hash.\n\n**Params**\n\n* `options` **{Object}**: Handlebars provided options object.\n\n## number\n\n### bytes\n\nFormat a number to it's equivalent in bytes. If a string is passed, it's length will be formatted and returned.\n\n**Examples:**\n\n* `'foo' => 3 B`\n* `13661855 => 13.66 MB`\n* `825399 => 825.39 kB`\n* `1396 => 1.4 kB`\n\n**Params**\n\n* `number` **{Number|String}**\n* `returns` **{String}**\n\n### addCommas\n\nAdd commas to numbers\n\n**Params**\n\n* `num` **{Number}**\n* `returns` **{Number}**\n\n### phoneNumber\n\nConvert a string or number to a formatted phone number.\n\n**Params**\n\n* `num` **{Number|String}**: The phone number to format, e.g. `8005551212`\n* `returns` **{Number}**: Formatted phone number: `(800) 555-1212`\n\n### toAbbr\n\nAbbreviate numbers to the given number of `precision`. This is for\ngeneral numbers, not size in bytes.\n\n**Params**\n\n* `number` **{Number}**\n* `precision` **{Number}**\n* `returns` **{String}**\n\n### toExponential\n\nReturns a string representing the given number in exponential notation.\n\n**Params**\n\n* `number` **{Number}**\n* `fractionDigits` **{Number}**: Optional. An integer specifying the number of digits to use after the decimal point. Defaults to as many digits as necessary to specify the number.\n* `returns` **{Number}**\n\n**Example**\n\n```handlebars\n{{toExponential number digits}};\n```\n\n### toFixed\n\nFormats the given number using fixed-point notation.\n\n**Params**\n\n* `number` **{Number}**\n* `digits` **{Number}**: (Optional) The number of digits to appear after the decimal point; this may be a value between 0 and 20. If this argument is omitted, it is treated as 0.\n* `returns` **{String}**: A string representing the given number using fixed-point notation.\n\n**Example**\n\n```handlebars\n{{toFixed \"1.1234\" 2}}\n//=> '1.12'\n```\n\n### toFloat\n\n**Params**\n\n* `number` **{Number}**\n* `returns` **{Number}**\n\n### toInt\n\n**Params**\n\n* `number` **{Number}**\n* `returns` **{Number}**\n\n### toPrecision\n\nReturns a string representing the `Number` object to the specified precision.\n\n**Params**\n\n* `number` **{Number}**\n* `precision` **{Number}**: (Optional) An integer specifying the number of significant digits. If precison is not between 1 and 100 (inclusive), it will be coerced to `0`.\n* `returns` **{String}**: A string representing a Number object in fixed-point or exponential notation rounded to precision significant digits.\n\n**Example**\n\n```handlebars\n{{toPrecision \"1.1234\" 2}}\n//=> '1.1'\n```\n\n## object\n\n### extend\n\nExtend the context with the properties of other objects.\nA shallow merge is performed to avoid mutating the context.\n\n**Params**\n\n* `objects` **{Object}**: One or more objects to extend.\n* `returns` **{Object}**\n\n### forIn\n\nBlock helper that iterates over the properties of\nan object, exposing each key and value on the context.\n\n**Params**\n\n* `context` **{Object}**\n* `options` **{Object}**\n* `returns` **{String}**\n\n### forOwn\n\nBlock helper that iterates over the **own** properties of\nan object, exposing each key and value on the context.\n\n**Params**\n\n* `obj` **{Object}**: The object to iterate over.\n* `options` **{Object}**\n* `returns` **{String}**\n\n### toPath\n\nTake arguments and, if they are string or number, convert them to a dot-delineated object property path.\n\n**Params**\n\n* `prop` **{String|Number}**: The property segments to assemble (can be multiple).\n* `returns` **{String}**\n\n### get\n\nUse property paths (`a.b.c`) to get a value or nested value from\nthe context. Works as a regular helper or block helper.\n\n**Params**\n\n* `prop` **{String}**: The property to get, optionally using dot notation for nested properties.\n* `context` **{Object}**: The context object\n* `options` **{Object}**: The handlebars options object, if used as a block helper.\n* `returns` **{String}**\n\n### getObject\n\nUse property paths (`a.b.c`) to get an object from\nthe context. Differs from the `get` helper in that this\nhelper will return the actual object, including the\ngiven property key. Also, this helper does not work as a\nblock helper.\n\n**Params**\n\n* `prop` **{String}**: The property to get, optionally using dot notation for nested properties.\n* `context` **{Object}**: The context object\n* `returns` **{String}**\n\n### hasOwn\n\nReturn true if `key` is an own, enumerable property of the given `context` object.\n\n**Params**\n\n* `key` **{String}**\n* `context` **{Object}**: The context object.\n* `returns` **{Boolean}**\n\n**Example**\n\n```handlebars\n{{hasOwn context key}}\n```\n\n### isObject\n\nReturn true if `value` is an object.\n\n**Params**\n\n* `value` **{String}**\n* `returns` **{Boolean}**\n\n**Example**\n\n```handlebars\n{{isObject \"foo\"}}\n//=> false\n```\n\n### JSONparse\n\nParses the given string using `JSON.parse`.\n\n**Params**\n\n* `string` **{String}**: The string to parse\n\n**Example**\n\n```handlebars\n<!-- string: '{\"foo\": \"bar\"}' -->\n{{JSONparse string}}\n<!-- results in: { foo: 'bar' } -->\n```\n\n### JSONstringify\n\nStringify an object using `JSON.stringify`.\n\n**Params**\n\n* `obj` **{Object}**: Object to stringify\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n<!-- object: { foo: 'bar' } -->\n{{JSONstringify object}}\n<!-- results in: '{\"foo\": \"bar\"}' -->\n```\n\n### merge\n\nDeeply merge the properties of the given `objects` with the\ncontext object.\n\n**Params**\n\n* `object` **{Object}**: The target object. Pass an empty object to shallow clone.\n* `objects` **{Object}**\n* `returns` **{Object}**\n\n### pick\n\nPick properties from the context object.\n\n**Params**\n\n* `properties` **{Array|String}**: One or more properties to pick.\n* `context` **{Object}**\n* `options` **{Object}**: Handlebars options object.\n* `returns` **{Object}**: Returns an object with the picked values. If used as a block helper, the values are passed as context to the inner block. If no values are found, the context is passed to the inverse block.\n\n## path\n\n### dirname\n\nGet the directory path segment from the given `filepath`.\n\n**Params**\n\n* `ext` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{dirname \"docs/toc.md\"}}\n<!-- results in: 'docs' -->\n```\n\n### relative\n\nGet the relative filepath from `a` to `b`.\n\n**Params**\n\n* `a` **{String}**\n* `b` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{relative a b}}\n```\n\n### basename\n\nGet the file extension from the given `filepath`.\n\n**Params**\n\n* `ext` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{basename \"docs/toc.md\"}}\n<!-- results in: 'toc.md' -->\n```\n\n### stem\n\nGet the \"stem\" from the given `filepath`.\n\n**Params**\n\n* `filepath` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{stem \"docs/toc.md\"}}\n<!-- results in: 'toc' -->\n```\n\n### extname\n\nGet the file extension from the given `filepath`.\n\n**Params**\n\n* `filepath` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{extname \"docs/toc.md\"}}\n<!-- results in: '.md' -->\n```\n\n### segments\n\nGet specific (joined) segments of a file path by passing a range of array indices.\n\n**Params**\n\n* `filepath` **{String}**: The file path to split into segments.\n* `returns` **{String}**: Returns a single, joined file path.\n\n**Example**\n\n```handlebars\n{{segments \"a/b/c/d\" \"2\" \"3\"}}\n<!-- results in: 'c/d' -->\n\n{{segments \"a/b/c/d\" \"1\" \"3\"}}\n<!-- results in: 'b/c/d' -->\n\n{{segments \"a/b/c/d\" \"1\" \"2\"}}\n<!-- results in: 'b/c' -->\n```\n\n## regex\n\n### toRegex\n\nConvert the given string to a regular expression.\n\n**Params**\n\n* `str` **{String}**\n* `returns` **{RegExp}**\n\n**Example**\n\n```handlebars\n{{toRegex \"foo\"}}\n<!-- results in: /foo/ -->\n```\n\n### test\n\nReturns true if the given `str` matches the given regex. A regex can be passed on the context, or using the [toRegex](#toregex) helper as a subexpression.\n\n**Params**\n\n* `str` **{String}**\n* `returns` **{RegExp}**\n\n**Example**\n\n```handlebars\n{{test \"bar\" (toRegex \"foo\")}}\n<!-- results in: false -->\n{{test \"foobar\" (toRegex \"foo\")}}\n<!-- results in: true -->\n{{test \"foobar\" (toRegex \"^foo$\")}}\n<!-- results in: false -->\n```\n\n## string\n\n### append\n\nAppend the specified `suffix` to the given string.\n\n**Params**\n\n* `str` **{String}**\n* `suffix` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n<!-- given that \"item.stem\" is \"foo\" -->\n{{append item.stem \".html\"}}\n<!-- results in:  'foo.html' -->\n```\n\n### camelcase\n\ncamelCase the characters in the given `string`.\n\n**Params**\n\n* `string` **{String}**: The string to camelcase.\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{camelcase \"foo bar baz\"}};\n<!-- results in:  'fooBarBaz' -->\n```\n\n### capitalize\n\nCapitalize the first word in a sentence.\n\n**Params**\n\n* `str` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{capitalize \"foo bar baz\"}}\n<!-- results in:  \"Foo bar baz\" -->\n```\n\n### capitalizeAll\n\nCapitalize all words in a string.\n\n**Params**\n\n* `str` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{capitalizeAll \"foo bar baz\"}}\n<!-- results in:  \"Foo Bar Baz\" -->\n```\n\n### center\n\nCenter a string using non-breaking spaces\n\n**Params**\n\n* `str` **{String}**\n* `spaces` **{String}**\n* `returns` **{String}**\n\n### chop\n\nLike trim, but removes both extraneous whitespace **and non-word characters** from the beginning and end of a string.\n\n**Params**\n\n* `string` **{String}**: The string to chop.\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{chop \"_ABC_\"}}\n<!-- results in:  'ABC' -->\n\n{{chop \"-ABC-\"}}\n<!-- results in:  'ABC' -->\n\n{{chop \" ABC \"}}\n<!-- results in:  'ABC' -->\n```\n\n### dashcase\n\ndash-case the characters in `string`. Replaces non-word characters and periods with hyphens.\n\n**Params**\n\n* `string` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{dashcase \"a-b-c d_e\"}}\n<!-- results in:  'a-b-c-d-e' -->\n```\n\n### dotcase\n\ndot.case the characters in `string`.\n\n**Params**\n\n* `string` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{dotcase \"a-b-c d_e\"}}\n<!-- results in:  'a.b.c.d.e' -->\n```\n\n### ellipsis\n\nTruncates a string to the specified `length`, and appends it with an elipsis, `…`.\n\n**Params**\n\n* `str` **{String}**\n* `length` **{Number}**: The desired length of the returned string.\n* `returns` **{String}**: The truncated string.\n\n**Example**\n\n```handlebars\n{{ellipsis (sanitize \"<span>foo bar baz</span>\"), 7}}\n<!-- results in:  'foo bar…' -->\n{{ellipsis \"foo bar baz\", 7}}\n<!-- results in:  'foo bar…' -->\n```\n\n### hyphenate\n\nReplace spaces in a string with hyphens.\n\n**Params**\n\n* `str` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{hyphenate \"foo bar baz qux\"}}\n<!-- results in:  \"foo-bar-baz-qux\" -->\n```\n\n### isString\n\nReturn true if `value` is a string.\n\n**Params**\n\n* `value` **{String}**\n* `returns` **{Boolean}**\n\n**Example**\n\n```handlebars\n{{isString \"foo\"}}\n<!-- results in:  'true' -->\n```\n\n### lowercase\n\nLowercase all characters in the given string.\n\n**Params**\n\n* `str` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{lowercase \"Foo BAR baZ\"}}\n<!-- results in:  'foo bar baz' -->\n```\n\n### occurrences\n\nReturn the number of occurrences of `substring` within the given `string`.\n\n**Params**\n\n* `str` **{String}**\n* `substring` **{String}**\n* `returns` **{Number}**: Number of occurrences\n\n**Example**\n\n```handlebars\n{{occurrences \"foo bar foo bar baz\" \"foo\"}}\n<!-- results in:  2 -->\n```\n\n### pascalcase\n\nPascalCase the characters in `string`.\n\n**Params**\n\n* `string` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{pascalcase \"foo bar baz\"}}\n<!-- results in:  'FooBarBaz' -->\n```\n\n### pathcase\n\npath/case the characters in `string`.\n\n**Params**\n\n* `string` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{pathcase \"a-b-c d_e\"}}\n<!-- results in:  'a/b/c/d/e' -->\n```\n\n### plusify\n\nReplace spaces in the given string with pluses.\n\n**Params**\n\n* `str` **{String}**: The input string\n* `returns` **{String}**: Input string with spaces replaced by plus signs\n\n**Example**\n\n```handlebars\n{{plusify \"foo bar baz\"}}\n<!-- results in:  'foo+bar+baz' -->\n```\n\n### prepend\n\nPrepends the given `string` with the specified `prefix`.\n\n**Params**\n\n* `str` **{String}**\n* `prefix` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n<!-- given that \"val\" is \"bar\" -->\n{{prepend val \"foo-\"}}\n<!-- results in:  'foo-bar' -->\n```\n\n### raw\n\nRender a block without processing mustache templates inside the block.\n\n**Params**\n\n* `options` **{Object}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{{{#raw}}}}\n{{foo}}\n{{{{/raw}}}}\n<!-- results in:  '{{foo}}' -->\n```\n\n### remove\n\nRemove all occurrences of `substring` from the given `str`.\n\n**Params**\n\n* `str` **{String}**\n* `substring` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{remove \"a b a b a b\" \"a \"}}\n<!-- results in:  'b b b' -->\n```\n\n### removeFirst\n\nRemove the first occurrence of `substring` from the given `str`.\n\n**Params**\n\n* `str` **{String}**\n* `substring` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{remove \"a b a b a b\" \"a\"}}\n<!-- results in:  ' b a b a b' -->\n```\n\n### replace\n\nReplace all occurrences of substring `a` with substring `b`.\n\n**Params**\n\n* `str` **{String}**\n* `a` **{String}**\n* `b` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{replace \"a b a b a b\" \"a\" \"z\"}}\n<!-- results in:  'z b z b z b' -->\n```\n\n### replaceFirst\n\nReplace the first occurrence of substring `a` with substring `b`.\n\n**Params**\n\n* `str` **{String}**\n* `a` **{String}**\n* `b` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{replace \"a b a b a b\" \"a\" \"z\"}}\n<!-- results in:  'z b a b a b' -->\n```\n\n### sentence\n\nSentence case the given string\n\n**Params**\n\n* `str` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{sentence \"hello world. goodbye world.\"}}\n<!-- results in:  'Hello world. Goodbye world.' -->\n```\n\n### snakecase\n\nsnake_case the characters in the given `string`.\n\n**Params**\n\n* `string` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{snakecase \"a-b-c d_e\"}}\n<!-- results in:  'a_b_c_d_e' -->\n```\n\n### split\n\nSplit `string` by the given separator, which can be a string or a regular expression.\n\n**Params**\n\n* `string` **{String}**: The string to split.\n* `returns` **{String|RegExp}** `separator`: Default is an empty string.\n\n**Example**\n\n```handlebars\n{{split \"a,b,c\" \",\"}}\n<!-- results in:  ['a', 'b', 'c'] -->\n```\n\n### startsWith\n\nTests whether a string begins with the given prefix.\n\n**Params**\n\n* `prefix` **{String}**\n* `testString` **{String}**\n* `options` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{#startsWith \"Goodbye\" \"Hello, world!\"}}\n  Whoops\n{{else}}\n  Bro, do you even hello world?\n{{/startsWith}}\n```\n\n### titleize\n\nTitle case the given string.\n\n**Params**\n\n* `str` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{titleize \"this is title case\"}}\n<!-- results in:  'This Is Title Case' -->\n```\n\n### trim\n\nRemoves extraneous whitespace from the beginning and end of a string.\n\n**Params**\n\n* `string` **{String}**: The string to trim.\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{trim \" ABC \"}}\n<!-- results in:  'ABC' -->\n```\n\n### trimLeft\n\nRemoves extraneous whitespace from the beginning of a string.\n\n**Params**\n\n* `string` **{String}**: The string to trim.\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{trim \" ABC \"}}\n<!-- results in:  'ABC ' -->\n```\n\n### trimRight\n\nRemoves extraneous whitespace from the end of a string.\n\n**Params**\n\n* `string` **{String}**: The string to trim.\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{trimRight \" ABC \"}}\n<!-- results in:  ' ABC' -->\n```\n\n### truncate\n\nTruncate a string to the specified `length`. Also see [ellipsis](#ellipsis).\n\n**Params**\n\n* `str` **{String}**\n* `limit` **{Number}**: The desired length of the returned string.\n* `suffix` **{String}**: Optionally supply a string to use as a suffix to denote when the string has been truncated. Otherwise an ellipsis (`…`) will be used.\n* `returns` **{String}**: The truncated string.\n\n**Example**\n\n```handlebars\ntruncate(\"foo bar baz\", 7);\n<!-- results in:  'foo bar' -->\ntruncate(sanitize(\"<span>foo bar baz</span>\", 7));\n<!-- results in:  'foo bar' -->\n```\n\n### truncateWords\n\nTruncate a string to have the specified number of words. Also see [truncate](#truncate).\n\n**Params**\n\n* `str` **{String}**\n* `limit` **{Number}**: The desired length of the returned string.\n* `suffix` **{String}**: Optionally supply a string to use as a suffix to denote when the string has been truncated.\n* `returns` **{String}**: The truncated string.\n\n**Example**\n\n```handlebars\ntruncateWords(\"foo bar baz\", 1);\n<!-- results in:  'foo…' -->\ntruncateWords(\"foo bar baz\", 2);\n<!-- results in:  'foo bar…' -->\ntruncateWords(\"foo bar baz\", 3);\n<!-- results in:  'foo bar baz' -->\n```\n\n### uppercase\n\nUppercase all of the characters in the given string. If used as a block helper it will uppercase the entire block. This helper does not support inverse blocks.\n\n**Params**\n\n* `str` **{String}**: The string to uppercase\n* `options` **{Object}**: Handlebars options object\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{uppercase \"aBcDeF\"}}\n<!-- results in:  'ABCDEF' -->\n```\n\n## url\n\n### decodeURIComponent\n\nDecode a Uniform Resource Identifier (URI) component.\n\n**Params**\n\n* `str` **{String}**\n* `returns` **{String}**\n\n### encodeURIComponent\n\nEncodes a Uniform Resource Identifier (URI) component\nby replacing each instance of certain characters by\none, two, three, or four escape sequences representing\nthe UTF-8 encoding of the character.\n\n**Params**\n\n* `str` **{String}**: The un-encoded string\n* `returns` **{String}**: The encoded string\n\n### urlResolve\n\nTake a base URL and a href URL and resolve them as a\nbrowser would for an anchor tag.\n\n**Params**\n\n* `base` **{String}**\n* `href` **{String}**\n* `returns` **{String}**\n\n**Example**\n\n```handlebars\n{{urlResolve \"http://example.com\" \"one\"}}\n<!-- results in: 'http://example.com/one' -->\n\n{{urlResolve \"http://example.com/\" \"/one\"}}\n<!-- results in: 'http://example.com/one' -->\n\n{{urlResolve \"http://example.com/one\" \"/two\"}}\n<!-- results in: 'http://example.com/two' -->\n\n{{urlResolve \"http://example.com/one/\" \"two\"}}\n<!-- results in: 'http://example.com/one/two' -->\n\n{{urlResolve \"http://example.com/one/\" \"./two\"}}\n<!-- results in: 'http://example.com/one/two' -->\n\n{{urlResolve \"http://example.com/one\" \"./two\"}}\n<!-- results in: 'http://example.com/two' -->\n```\n\n### urlParse\n\nParses a `url` string into an object.\n\n**Params**\n\n* `str` **{String}**: URL string\n* `returns` **{String}**: Returns stringified JSON\n\n### stripQuerystring\n\nStrip the query string from the given `url`.\n\n**Params**\n\n* `url` **{String}**\n* `returns` **{String}**: the url without the queryString\n\n***\n\n## About\n\n### Related projects\n\n* [template-helpers](https://www.npmjs.com/package/template-helpers): Generic JavaScript helpers that can be used with any template engine. Handlebars, Lo-Dash, Underscore, or… [more](https://github.com/jonschlinkert/template-helpers) | [homepage](https://github.com/jonschlinkert/template-helpers \"Generic JavaScript helpers that can be used with any template engine. Handlebars, Lo-Dash, Underscore, or any engine that supports helper functions.\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/wirechunk/handlebars-helpers/issues).\n\n### Running tests\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install this project's dependencies and run tests with the following command:\n\n```sh\nnpm install && npm test\n```\n\n### Author\n\n**[Brian Woodward](https://github.com/doowb)**\n\n**[Dmitriy Cherchenko](https://github.com/dchenk)**\n\n**[Jon Schlinkert](https://github.com/jonschlinkert)**\n\n### License\n\nCopyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).\nWhen this project was created some helpers were sourced from [Swag, by Elving Rodriguez](http://elving.github.com/swag/).\nReleased under the [MIT License](LICENSE).\n<!-- {% endraw %} -->\n","readmeFilename":"README.md"}