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

@erickmerchant/framework

Package Overview
Dependencies
Maintainers
1
Versions
244
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@erickmerchant/framework - npm Package Compare versions

Comparing version 43.1.1 to 43.1.2

4

create-dom-view.js

@@ -138,3 +138,3 @@ import {tokenTypes} from './html.js'

if (isExistingElement && isSameView) {
attributeIndex = next.attributes.inset ?? 0
attributeIndex = next.attributes.offset ?? 0
}

@@ -185,3 +185,3 @@

if (isExistingElement && isSameView) {
childIndex = next.children.inset ?? 0
childIndex = next.children.offset ?? 0

@@ -188,0 +188,0 @@ childNode = target.childNodes[childIndex]

@@ -173,3 +173,3 @@ const weakMap = new WeakMap()

const parse = (tokens, parent, tag, variables) => {
const parse = (nextToken, parent, tag, variables) => {
const child = {

@@ -183,39 +183,29 @@ tag,

let current
let token
for (;;) {
current = tokens.next()
token = nextToken()
if (current.done) break
if (token == null || token === END) break
const token = current.value
if (token === END) {
break
}
let next = token
let key = false
let firstChar
let hasColon
let hasAtSign
let constant = false
let value = token.value
if (next.type === tokenTypes.key) {
next = tokens.next()?.value
if (token.type === tokenTypes.key) {
key = token.value
token = nextToken()
firstChar = key.charAt(0)
hasColon = ':' === firstChar
hasAtSign = '@' === firstChar
const firstChar = key.charAt(0)
const colon = ':' === firstChar
const atSign = '@' === firstChar
if (hasColon) {
key = token.value.substring(1)
if (colon) {
key = key.substring(1)
}
constant = next.type === tokenTypes.value
value = next.value
constant = token.type === tokenTypes.value
value = token.value
if (next.type === tokenTypes.variable && !hasColon && !hasAtSign) {
if (token.type === tokenTypes.variable && !colon && !atSign) {
value = variables[value]

@@ -227,3 +217,3 @@ constant = true

if (constant) {
if (child.attributes.inset != null) child.attributes.inset++
if (child.attributes.offset != null) child.attributes.offset++

@@ -238,3 +228,4 @@ child.attributes.unshift({

child.attributes.inset = child.attributes.inset ?? child.attributes.length
child.attributes.offset =
child.attributes.offset ?? child.attributes.length

@@ -250,12 +241,10 @@ child.attributes.push({

for (;;) {
current = tokens.next()
token = nextToken()
if (current.done) break
if (token == null) break
const token = current.value
if (token.type === tokenTypes.endtag && token.value === child.tag) {
break
} else if (token.type === tokenTypes.tag) {
const dynamic = parse(tokens, child, token.value, variables)
const dynamic = parse(nextToken, child, token.value, variables)

@@ -271,3 +260,3 @@ child.dynamic = child.dynamic || dynamic

child.children.inset = child.children.inset ?? child.children.length
child.children.offset = child.children.offset ?? child.children.length

@@ -282,3 +271,3 @@ child.children.push({

if (child.dynamic) {
parent.children.inset = parent.children.inset ?? parent.children.length
parent.children.offset = parent.children.offset ?? parent.children.length
}

@@ -300,13 +289,19 @@

const nextToken = () => {
const token = tokens.next()
if (token.done) return
return token.value
}
const children = []
for (;;) {
const current = tokens.next()
const token = nextToken()
if (current.done) break
if (token == null) break
const token = current.value
if (token.type === tokenTypes.tag) {
parse(tokens, {children}, token.value, variables)
parse(nextToken, {children}, token.value, variables)
} else if (token.type === tokenTypes.text && token.value.trim()) {

@@ -313,0 +308,0 @@ throw createAssertionError(token.type, "'node'")

{
"name": "@erickmerchant/framework",
"version": "43.1.1",
"version": "43.1.2",
"description": "A front-end framework.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/erickmerchant/framework#readme",

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