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 5.0.1 to 6.0.0

26

dist/main.js

@@ -13,7 +13,9 @@ 'use strict';

var context = {};
var href = void 0;
var state = store();
var show = singlePage(function (href) {
context.href = href;
var rafCalled = false;
var show = singlePage(function (newHref) {
href = newHref;
render();

@@ -25,13 +27,19 @@ });

function dispatch() {
render.apply(undefined, arguments);
state = store.apply(undefined, [state].concat(Array.prototype.slice.call(arguments)));
render();
}
function render() {
state = store.apply(undefined, [state].concat(Array.prototype.slice.call(arguments)));
if (!rafCalled) {
rafCalled = true;
window.requestAnimationFrame(function () {
var element = component({ state: state, dispatch: dispatch, context: context, show: show, html: html, next: next });
window.requestAnimationFrame(function () {
rafCalled = false;
diffhtml.innerHTML(target, element);
});
var element = component(href)({ state: state, dispatch: dispatch, show: show, html: html, next: next });
diffhtml.innerHTML(target, element);
});
}
}

@@ -38,0 +46,0 @@

@@ -7,7 +7,9 @@ const catchLinks = require('catch-links')

module.exports = function ({target, store, component}) {
let context = {}
let href
let state = store()
const show = singlePage(function (href) {
context.href = href
let rafCalled = false
const show = singlePage(function (newHref) {
href = newHref
render()

@@ -19,13 +21,19 @@ })

function dispatch () {
render(...arguments)
state = store(state, ...arguments)
render()
}
function render () {
state = store(state, ...arguments)
if (!rafCalled) {
rafCalled = true
window.requestAnimationFrame(() => {
const element = component({state, dispatch, context, show, html, next})
window.requestAnimationFrame(() => {
rafCalled = false
diffhtml.innerHTML(target, element)
})
const element = component(href)({state, dispatch, show, html, next})
diffhtml.innerHTML(target, element)
})
}
}

@@ -32,0 +40,0 @@

{
"name": "@erickmerchant/framework",
"version": "5.0.1",
"version": "6.0.0",
"description": "A simple data down, actions up framework.",

@@ -5,0 +5,0 @@ "main": "dist/main.js",

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