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 9.1.0 to 9.2.0

20

dist/main.js

@@ -8,2 +8,3 @@ "use strict";

diff = _ref.diff,
options = _ref.options,
raf = _ref.raf;

@@ -13,3 +14,12 @@

var state = store();
options = options != null ? Object.assign({}, options, { dispatch: dispatch, next: next }) : { dispatch: dispatch, next: next };
var stores = store;
if (!Array.isArray(store)) {
stores = [store];
}
var state = stores.reduce(function (state, store) {
return store(state);
});
var rafCalled = false;

@@ -22,4 +32,8 @@

function dispatch() {
state = store.apply(undefined, [state].concat(Array.prototype.slice.call(arguments)));
var _arguments = arguments;
state = stores.reduce(function (state, store) {
return store.apply(undefined, [state].concat(Array.prototype.slice.call(_arguments)));
}, state);
if (!rafCalled) {

@@ -35,3 +49,3 @@ rafCalled = true;

var element = component({ state: state, dispatch: dispatch, next: next });
var element = component(Object.assign({ state: state }, options));

@@ -38,0 +52,0 @@ if (element != null) {

15

main.js

@@ -1,5 +0,12 @@

module.exports = function ({target, store, component, diff, raf}) {
module.exports = function ({target, store, component, diff, options, raf}) {
raf = raf != null ? raf : window.requestAnimationFrame
let state = store()
options = options != null ? Object.assign({}, options, {dispatch, next}) : {dispatch, next}
let stores = store
if (!Array.isArray(store)) {
stores = [store]
}
let state = stores.reduce((state, store) => store(state))
let rafCalled = false

@@ -12,3 +19,3 @@

function dispatch () {
state = store(state, ...arguments)
state = stores.reduce((state, store) => store(state, ...arguments), state)

@@ -25,3 +32,3 @@ if (!rafCalled) {

const element = component({state, dispatch, next})
const element = component(Object.assign({state}, options))

@@ -28,0 +35,0 @@ if (element != null) {

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

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

@@ -126,8 +126,12 @@ # @erickmerchant/framework

- [@erickmerchant/state-container](https://github.com/erickmerchant/state-container)
- [@erickmerchant/combine-stores](https://github.com/erickmerchant/combine-stores)
A state container to use as a store
A module to create a store from other stores where each is responsible for one property in the state.
- [@erickmerchant/router](https://github.com/erickmerchant/router)
A module to do routing inside your components.
- [A TodoMVC example](http://todo.erickmerchant.com)
The source code can be found [here](https://github.com/erickmerchant/framework-todo)
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