🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@cocreate/elements

Package Overview
Dependencies
Maintainers
0
Versions
250
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cocreate/elements - npm Package Compare versions

Comparing version

to
1.41.1

2

package.json
{
"name": "@cocreate/elements",
"version": "1.41.0",
"version": "1.41.1",
"description": "Fetch content into any html element by using html5 attributes to query data stored in CoCreate headless CMS. If data is changed it will instantly reflect in html tags as changes are broadcasted in realtime",

@@ -5,0 +5,0 @@ "keywords": [

@@ -152,12 +152,16 @@ import observer from "@cocreate/observer";

}
} else if (element.hasAttribute("rendered")) {
}
// else if (element.hasAttribute("rendered")) {
// element.removeAttribute("rendered");
// // let path = element.getAttribute("path");
// // if (path) {
// // let elements = element.querySelectorAll("[src]");
// // for (let i = 0; i < elements.length; i++) {
// // text = text.replaceAll("{{path}}", path);
// // }
// // }
// }
else {
element.removeAttribute("rendered");
// let path = element.getAttribute("path");
// if (path) {
// let elements = element.querySelectorAll("[src]");
// for (let i = 0; i < elements.length; i++) {
// text = text.replaceAll("{{path}}", path);
// }
// }
} else {
let text = await response.text();

@@ -164,0 +168,0 @@ if (text) {

@@ -483,4 +483,8 @@ /********************************************************************************

if (docValue) {
if (Array.isArray(docValue)) Data.push(...docValue);
else {
if (operator === "$sum" && typeof docValue === "number") {
if (typeof value !== "number") value = 0;
value += docValue;
} else if (Array.isArray(docValue)) {
Data.push(...docValue);
} else {
isObject = true;

@@ -500,7 +504,7 @@ Data.push(docValue);

if (!operator) data = Data;
else if (operator === "$sum") {
value = Data.reduce((accumulator, currentValue) => {
return accumulator + currentValue;
}, 0);
}
// else if (operator === "$sum") {
// value = data[type].reduce((accumulator, currentValue) => {
// return accumulator + currentValue;
// }, 0);
// }
} else {

@@ -507,0 +511,0 @@ data = { [property]: data[type][property] };

Sorry, the diff of this file is too big to display