html-express-js 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "html-express-js",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "An Express template engine to render HTML views using native JavaScript",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/index.js CHANGED
@@ -68,12 +68,12 @@ export function html(strings, ...data) {
68
68
  /**
69
69
  * Returns a template engine view function.
70
70
  *
71
- * @param {object} opts
71
+ * @param {object} [opts]
72
72
  * @param {object} [opts.includesDir]
73
73
  * @param {object} [opts.notFoundView]
74
74
  * @returns {Function}
75
75
  */
76
- export default function (opts) {
76
+ export default function (opts = {}) {
77
77
  return async (filePath, data, callback) => {
78
78
  const viewsDir = data.settings.views;
79
79
  const includePath = opts.includesDir || 'includes';