UNPKG

fileutils-cli

Version:

A collection of powerful command line file utilities

22 lines (20 loc) 1.06 kB
// Uncomment the next line to create an alias for any of the default Nunjucks filters https://mozilla.github.io/nunjucks/templating.html#builtin-filters // const defaultFilters = require('../nunjucks/src/filters'); // These are some helpful libraries already included in rename-cli // All the built-in nodejs libraries are also available // const exif = require('jpeg-exif'); // https://github.com/zhso/jpeg-exif // const fs = require('fs-extra'); // https://github.com/jprichardson/node-fs-extra // const Fraction = require('fraction.js'); // https://github.com/infusion/Fraction.js // const { format } = require('date-fns'); // https://date-fns.org/ // Nunjucks custom filter documentation https://mozilla.github.io/nunjucks/api#custom-filters module.exports = { // Create an alias for a built-in filter // big: defaultFilters.upper, // Create your own filter // match: function(str, regexp, flags) { // if (regexp instanceof RegExp === false) { // regexp = new RegExp(regexp, flags); // } // return str.match(regexp); // } };