@alexcarpenter/eleventy-plugin-pluralize

1.0.0 • Public • Published

eleventy-plugin-pluralize

An Eleventy plugin to pluralize text.

Installation

$ npm install @alexcarpenter/eleventy-plugin-pluralize
const pluralize = require('@alexcarpenter/eleventy-plugin-pluralize');

module.exports = eleventyConfig => {
  eleventyConfig.addPlugin(pluralize);
}

Usage

{{ 'unicorn' | pluralize(4) }} //=> 'unicorns'

{{ 'puppy' | pluralize(2) }} //=> 'puppies'

{{ 'box' | pluralize(2) }} //=> 'boxes'

{{ 'cactus' | pluralize(2) }} //=> 'cacti'

Credit

This plugin is simply a wrapper for plur, an awesome little package by sindresorhus. All credit for the pluralization functionality of this plugin goes to them.

Readme

Keywords

Package Sidebar

Install

npm i @alexcarpenter/eleventy-plugin-pluralize

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

1.42 kB

Total Files

3

Last publish

Collaborators

  • alexcarpenter