1.0.1 • Published 3 years ago

handlebars-helpers-inflections v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

handlebars-helpers-inflect

A collection of Handlebars helpers for inflecting and formatting strings and numbers.

A subset of handlebars-helpers.

{{inflect}}: format a string into singular or plural forms

{{ordinalize}}: add ordinal suffixes to numbers (7 => '7th')

{{addCommas}}: Group numbers with commas (9000 => "9,000")

{{toFixed}}: Convert to a float to a decimal precision.

{{toFloat}}: Convert a string or integer to a floating-point number.

{{toInt}}: Convert a string or float to an integer.

{{toPrecision}}: Convert a number to a given precision.

{{capitalizeFirst}}: Capitalize first word in a sentence

{{capitalizeEach}}: Capitalize each word in a sentence

{{center}}: Center a string using non-breaking spaces

{{dashify}}: Replace periods in string with hyphens.

{{hyphenate}}: Replace spaces in string with hyphens.

{{lowercase}}: Make all letters in the string lowercase

{{plusify}}: Replace spaces in string with pluses.

{{sentence}}: Sentence case

{{titleize}}: Title case. "This is Title Case"

{{uppercase}}:

{{reverse}}:

{{count}}: Return the number of occurrences of a string, within a string

{{replace}}: Replace occurrences of string "A" with string "B"

{{truncate}}: * Truncates a string given a specified length.

{{startsWith}}: Tests whether a string begins with the given prefix.

License

MIT.

1.0.1

3 years ago

1.0.0

9 years ago