You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

cssx-framework

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cssx-framework - npm Package Compare versions

Comparing version

to
0.0.14

2

package.json
{
"name": "cssx-framework",
"version": "0.0.13",
"version": "0.0.14",
"description": "A CSS driven web framework that compiles semi-standard CSS into HTML content + styles at runtime",

@@ -5,0 +5,0 @@ "main": "index.js",

export class CHARS {
static SPACE = ' '
static NEWLINE = '\n'
static RETURN = '\r'
static DOT = '.'

@@ -5,0 +6,0 @@ static COMMA = ','

@@ -79,4 +79,12 @@ import { htmlElementAttributes } from 'html-element-attributes'

if (obj.type === 'element') {
// Take only the last value for each attribute to remove duplicates
var attrsObj = obj.attrs.reduce((acc, attr) => ({...acc, [attr.name]: attr.value}), {})
// For regular attributes, take only the last value for each attribute to remove duplicates
// For event attributes, combine all values into a single concatenated string to allow multi-line functions
var attrsObj = obj.attrs.reduce((acc, attr) => (
{
...acc,
[attr.name]: acc.hasOwnProperty(attr.name) && htmlEventAttributes.includes(attr.name)
? `${acc[attr.name]} ${attr.value}`
: attr.value
}
), {})
returnText = `${CHARS.LESS_THAN}${obj.value} ${Object.entries(attrsObj).map(([name, value]) => `${name}="${replaceVariables(value, vars)}"`).join(CHARS.SPACE)}${CHARS.GREATER_THAN}`

@@ -83,0 +91,0 @@ returnElementTag = `${CHARS.LESS_THAN}${CHARS.SLASH}${obj.value}${CHARS.GREATER_THAN}`

@@ -96,3 +96,3 @@ import { readFileSync } from 'fs'

overrideParams(newMixin, params)
parent.children.push(

@@ -99,0 +99,0 @@ ...newMixin.children