Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
H

handlebars-helpers

> 编程语言
Open source

188 handlebars helpers in ~20 categories. Can be used with Assemble, Ghost, YUI, express.js etc.

2.3K stars0 likes4 views
WebsiteGitHub

About

188 handlebars helpers in ~20 categories. Can be used with Assemble, Ghost, YUI, express.js etc.

handlebars-helpers

More than 130 Handlebars helpers in ~20 categories. Helpers can be used with Assemble, Generate, Verb, Ghost, gulp-handlebars, grunt-handlebars, consolidate, or any node.js/Handlebars project.

You might also be interested in template-helpers.

  • Install
  • Browser usage
  • Usage
  • Helpers
  • Utils
  • History
  • About

Install

Install with npm:

bash
$ npm install --save handlebars-helpers

Install with yarn:

bash
$ yarn add handlebars-helpers

Browser usage

See how to use handlebars-helpers in the browser.

Usage

The main export returns a function that needs to be called to expose the object of helpers.

Get all helpers

javascript
var helpers = require('handlebars-helpers')();
//=> returns object with all (130+) helpers

Get a specific helper collection

Helper collections are exposed as getters, so only the helpers you want will be required and loaded.

javascript
var helpers = require('handlebars-helpers');
var math = helpers.math();
//=> only the `math` helpers

var helpers = require('handlebars-helpers');
var array = helpers.array();
//=> only the `collections` helpers

Get multiple helpers collections

Helper collections are exposed as getters, so only the helpers you want will be required and loaded.

javascript
var helpers = require('handlebars-helpers')(['math', 'string']);
//=> only the `math` and `string` helpers

Optionally pass your own handlebars

javascript
var handlebars = require('handlebars');
var helpers = require('handlebars-helpers')({
  handlebars: handlebars
});

// or for a specific collection
var math = helpers.math({
  handlebars: handlebars
});

Helpers

Categories

Currently 189 helpers in 20 categories:

  • array (code | unit tests)
  • code (code | unit tests)
  • collection (code | unit tests)
  • comparison (code | unit tests)
  • date (code | unit tests)
  • fs (code | unit tests)
  • html (code | unit tests)
  • i18n (code | unit tests)
  • inflection (code | unit tests)
  • logging (code | unit tests)
  • markdown (code | unit tests)
  • match (code | unit tests)
  • math (code | unit tests)
  • misc (code | unit tests)
  • number (code | unit tests)
  • object (code | unit tests)
  • path (code | unit tests)
  • regex (code | unit tests)
  • string (code | unit tests)
  • url (code | unit tests)

All helpers

array helpers

Visit the: code | unit tests | issues)

  • after (code | tests)
  • arrayify (code | tests)
  • before (code | tests)
  • eachIndex (code | tests)
  • filter (code | tests)
  • first (code | tests)
  • forEach (code | tests)
  • inArray (code | tests)
  • isArray (code | tests)
  • itemAt (code | tests)
  • join (code | tests)
  • equalsLength (code | [no tests])
  • last (code | tests)
  • length (code | tests)
  • lengthEqual (code | tests)
  • map (code | tests)
  • pluck (code | tests)
  • reverse (code | [no tests])
  • some (code | tests)
  • sort (code | tests)
  • sortBy (code | tests)
  • withAfter (code | tests)
  • withBefore (code | tests)
  • withFirst (code | tests)
  • withGroup (code | tests)
  • withLast (code | tests)
  • withSort (code | tests)
  • unique (code | tests)

code helpers

Visit the: code | unit tests | issues)

  • embed (code | tests)
  • gist (code | tests)
  • jsfiddle (code | tests)

collection helpers

Visit the: code | unit tests | issues)

  • isEmpty (code | tests)
  • iterate (code | tests)

comparison helpers

Visit the: code | unit tests | issues)

  • and (code | tests)
  • compare (code | tests)
  • contains (code | tests)
  • default (code | tests)
  • eq (code | tests)
  • gt (code | tests)
  • gte (code | tests)
  • has (code | tests)
  • isFalsey (code | tests)
  • isTruthy (code | tests)
  • ifEven (code | tests)
  • ifNth (code | tests)
  • ifOdd (code | tests)
  • is (code | tests)
  • isnt (code | tests)
  • lt (code | tests)
  • lte (code | tests)
  • neither (code | tests)
  • not (code | [no tests])
  • or (code | tests)
  • unlessEq (code | tests)
  • unlessGt (code | tests)
  • unlessLt (code | tests)
  • unlessGteq (code | tests)
  • unlessLteq (code | tests)

date helpers

Visit the: code | unit tests | issues)

  • year (code | [no tests])
  • date (code | [no tests])
  • moment (code | [no tests])

fs helpers

Visit the: code | unit tests | issues)

  • fileSize (code | [no tests])
  • read (code | tests)
  • readdir (code | tests)

html helpers

Visit the: code | unit tests | issues)

  • attr (code | tests)
  • css (code | tests)
  • js (code | tests)
  • sanitize (code | tests)
  • ul (code | tests)
  • ol (code | tests)
  • thumbnailImage (code | tests)

i18n helpers

Visit the: code | unit tests | issues)

  • i18n (code | tests)

inflection helpers

Visit the: code | unit tests | issues)

  • inflect (code | tests)
  • ordinalize (code | tests)

logging helpers

Visit the: code | [unit tests](test/loggin

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptcompilehandlebarshandlebars-helpershelper

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言