New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

html-template-tag-stream

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-template-tag-stream - npm Package Compare versions

Comparing version 1.1.2 to 2.0.0

14

lib/generator-html.js

@@ -21,2 +21,4 @@ // src/libs/chars.ts

var htmlPrototype = Object.getPrototypeOf(html);
var GeneratorFunction = function* () {
}.constructor;
function* typeChecker(sub, isRawHtml) {

@@ -29,2 +31,8 @@ const type = typeof sub;

yield "" + sub;
} else if (Array.isArray(sub) || sub instanceof GeneratorFunction && (sub = sub())) {
for (const s of sub) {
for (const x of typeChecker(s, isRawHtml)) {
yield x;
}
}
} else if (sub instanceof Function) {

@@ -34,8 +42,2 @@ for (const s of typeChecker(sub(), isRawHtml)) {

}
} else if (Array.isArray(sub)) {
for (const s of sub) {
for (const x of typeChecker(s, true)) {
yield x;
}
}
} else if (sub.constructor === htmlPrototype) {

@@ -42,0 +44,0 @@ for (const s of sub) {

@@ -21,2 +21,4 @@ // src/libs/chars.ts

var htmlPrototype = Object.getPrototypeOf(html);
var GeneratorFunction = function* () {
}.constructor;
async function* typeChecker(sub, isRawHtml) {

@@ -29,2 +31,8 @@ const type = typeof sub, isPromise = sub instanceof Promise;

yield "" + sub;
} else if (Array.isArray(sub) || sub instanceof GeneratorFunction && (sub = sub())) {
for await (const s of sub) {
for await (const x of typeChecker(s, isRawHtml)) {
yield x;
}
}
} else if (isPromise || sub instanceof Function) {

@@ -35,8 +43,2 @@ sub = isPromise ? await sub : sub();

}
} else if (Array.isArray(sub)) {
for await (const s of sub) {
for await (const x of typeChecker(s, true)) {
yield x;
}
}
} else if (sub.constructor === htmlPrototype) {

@@ -43,0 +45,0 @@ for await (const s of sub) {

{
"name": "html-template-tag-stream",
"version": "1.1.2",
"version": "2.0.0",
"description": "ES6 Tagged Template for compiling HTML template streams.",

@@ -41,3 +41,6 @@ "main": "./lib/index.js",

"author": "Jon Nyman",
"license": "ISC"
"license": "ISC",
"devDependencies": {
"typescript": "^5.1.6"
}
}
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