Socket
Socket
Sign inDemoInstall

razjs

Package Overview
Dependencies
0
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 1.1.2

2

package.json
{
"name": "razjs",
"version": "1.1.1",
"version": "1.1.2",
"description": "JS-version of the Razor-Express library (Razor-like template engine for NodeJS Express).",

@@ -5,0 +5,0 @@ "scripts": {

@@ -101,17 +101,12 @@ # RazJS

window.addEventListener('error', function (e) {
if (!e.error.isRazorError) return;
setTimeout(() => {
// The document have to be fully loaded before replacing its whole content - that's why we use timer.
document.documentElement.innerHTML = e.error.html();
}, 0);
e.preventDefault(); // Stop propagating since we've handled it.
});
setTimeout(() => {
// The document have to be fully loaded before replacing its whole content - that's why we use timer.
document.documentElement.innerHTML = (e.error.isRazorError) ? e.error.html() : e.error.toString();
}, 0);
e.preventDefault(); // Stop propagating since we've handled it.
});
const num = 1;
const template = `
<div>
@Model
</span>`;
const html = raz.render(template, num);
const model = 1;
const template = "<span>@Model</span>";
const html = raz.render(template, model);
document.getElementById("target").innerHTML = html;

@@ -118,0 +113,0 @@

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