An open API service indexing awesome lists of open source software.

https://github.com/rdmurphy/nunjucks-comma-filter

Nunjucks doesn't have a comma filter! This fixes that.
https://github.com/rdmurphy/nunjucks-comma-filter

Last synced: 3 months ago
JSON representation

Nunjucks doesn't have a comma filter! This fixes that.

Awesome Lists containing this project

README

          

# Nunjucks Comma Filter [![Build Status](https://travis-ci.org/rdmurphy/nunjucks-comma-filter.svg?branch=master)](https://travis-ci.org/rdmurphy/nunjucks-comma-filter)

[Nunjucks](https://mozilla.github.io/nunjucks/) doesn't have a comma filter! This fixes that.

## Install

```sh
npm install --save-dev nunjucks-comma-filter
```

## Usage

```js
var nunjucks = require('nunjucks');
var commaFilter = require('nunjucks-comma-filter');

// However you end up with a nunjucks Environment
var env = nunjucks.configure('app', {watch: false});

env.addFilter('comma', commaFilter);
```

In your nunjucks template:

```html
{{ number_var|comma }}
```

## License

MIT © Ryan Murphy