Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

render.javascript

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

render.javascript - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

2

package.json

@@ -25,3 +25,3 @@ {

"name": "render.javascript",
"version": "0.1.2"
"version": "0.1.3"
}

@@ -9,4 +9,4 @@ const version = require('../package.json').version;

let head = "let str = '';with(obj){str+=`",
tail = "`; return str;}";
tail = "`; return str;}";
const variable = /\{\{([^}]+)\}\}/g;

@@ -28,19 +28,13 @@ const expression = /\{\%([^%]+)\%\}/g;

) : '') + fn(Object.assign(data, {
include: path => {
include: _path => {
let parts = filePath.split('/');
let $path = parts.join('/')
.split('\\')
.join('//')
.split('//')
.slice(0, -1)
.join('\\');
return renderFile($path + path?.replace(/\.\//g, '\\')?.replace(/\.\.\//g, '\\'), data, true);
let file = parts.slice(0, parts.length - 1).join('/');
return renderFile(file + '/' + _path, data, true);
}
})).replace('\r\n', '');
} catch (parseErr) {
} catch(parseErr) {
parseErr.name = 'Render.js Error';
const fileContent = fs.readFileSync(filePath).toString();
console.error(parseErr);
return fs.readFileSync(path.join(__dirname, './error.html')).toString()

@@ -47,0 +41,0 @@ .replace(/{{error}}/g, parseErr.name + ': ' + parseErr.message)

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc