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.
- Host: GitHub
- URL: https://github.com/rdmurphy/nunjucks-comma-filter
- Owner: rdmurphy
- License: mit
- Created: 2015-07-20T22:40:20.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-07-22T20:25:54.000Z (almost 11 years ago)
- Last Synced: 2025-08-17T05:51:38.758Z (10 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/nunjucks-comma-filter
- Size: 125 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nunjucks Comma Filter [](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