Socket
Socket
Sign inDemoInstall

periodicjs.core.responder

Package Overview
Dependencies
3
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.1 to 0.3.2

16

adapters/html_content.js

@@ -40,2 +40,3 @@ 'use strict';

const _RENDER = function (data, options) {
// console.log('__render', { data, options },'this',this);
try {

@@ -48,5 +49,5 @@ let { themename, viewname, extname, fileext, } = ['themename', 'viewname', 'extname', 'fileext', ].reduce((result, key) => {

let dirs = [];
//fallback view
dirs.push(path.join(options.dirname, `${viewname.replace(viewname.split('/')[0], 'default')}${(/^\./.test(fileext)) ? fileext : '.' + fileext}`));
if (options.dirname) {
//fallback view
dirs.push(path.join(options.dirname, `${viewname.replace(viewname.split('/')[0], 'default')}${(/^\./.test(fileext)) ? fileext : '.' + fileext}`));
if (Array.isArray(options.dirname)) options.dirname.forEach(dir => dirs.push(path.join(dir, `${ viewname }${ (/^\./.test(fileext)) ? fileext : '.' + fileext }`)));

@@ -56,5 +57,8 @@ else dirs.push(path.join(options.dirname, `${ viewname }${ (/^\./.test(fileext)) ? fileext : '.' + fileext }`));

}
if (typeof themename === 'string' && typeof fileext === 'string') dirs.push(path.join(__dirname, '../../../content/themes', themename, 'views', `${ viewname }${ (/^\./.test(fileext)) ? fileext : '.' + fileext }`));
if (typeof extname === 'string' && typeof fileext === 'string') dirs.push(path.join(__dirname, '../../', extname, 'views', `${ viewname }${ (/^\./.test(fileext)) ? fileext : '.' + fileext }`));
dirs.push(path.join(__dirname, '../../../app/views', `${viewname}${(/^\./.test(fileext)) ? fileext : '.' + fileext}`));
if (typeof themename === 'string' && typeof fileext === 'string') {
dirs.push(path.join(__dirname, '../../../../../node_modules', themename, 'views', `${viewname}${(/^\./.test(fileext)) ? fileext : '.' + fileext}`));
dirs.push(path.join(__dirname, '../../../../../content/container', themename, 'views', `${viewname}${(/^\./.test(fileext)) ? fileext : '.' + fileext}`));
}
if (typeof extname === 'string' && typeof fileext === 'string') dirs.push(path.join(__dirname, '../../../../', extname, 'views', `${ viewname }${ (/^\./.test(fileext)) ? fileext : '.' + fileext }`));
dirs.push(path.join(__dirname, '../../../../../app/views', `${viewname}${(/^\./.test(fileext)) ? fileext : '.' + fileext}`));

@@ -115,3 +119,3 @@ if (options.resolve_filepath === true) {

*/
constructor (options = {}) {
constructor(options = {}) {
super(options);

@@ -118,0 +122,0 @@ this.engine = (options.engine && typeof options.engine.render === 'function') ? options.engine : ejs;

@@ -91,4 +91,4 @@ {

},
"version": "0.3.1",
"version": "0.3.2",
"license": "MIT"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc