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 40.3.0 to 41.0.0

58

main.js

@@ -661,32 +661,44 @@ const svgNamespace = 'http://www.w3.org/2000/svg'

const app = {
const callView = () => {
viewCalled = false
return Promise.resolve().then(() => {
if (!viewCalled) {
viewCalled = true
view(state)
}
})
}
const proxy = (state) =>
typeof state === 'object'
? new Proxy(state, {
set(state, key, val) {
state[key] = val
callView()
return true
}
})
: state
state = proxy(state)
return {
render(v) {
view = v
viewCalled = false
callView()
},
set state(val) {
state = proxy(val)
return Promise.resolve().then(() => {
if (!viewCalled) {
viewCalled = true
view(state)
}
})
callView()
},
commit(arg) {
if (typeof arg === 'function') {
state = arg(state) ?? state
} else {
state = arg
}
viewCalled = true
if (view != null) {
view(state)
}
get state() {
return state
}
}
return app
}
{
"name": "@erickmerchant/framework",
"version": "40.3.0",
"version": "41.0.0",
"description": "A front-end framework.",

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

@@ -11,7 +11,7 @@ # @erickmerchant/framework

const decrement = () => {
app.commit((current) => current - 1)
app.state--
}
const increment = () => {
app.commit((current) => current + 1)
app.state++
}

@@ -18,0 +18,0 @@

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