@erickmerchant/framework
Advanced tools
Comparing version 10.0.1 to 10.0.2
19
main.js
module.exports = function ({target, store, component, diff, options, raf}) { | ||
raf = raf != null ? raf : window.requestAnimationFrame | ||
options = options != null ? Object.assign({}, options, {dispatch, next}) : {dispatch, next} | ||
let stores = store | ||
if (!Array.isArray(store)) { | ||
stores = [store] | ||
if (options != null) { | ||
options.dispatch = dispatch | ||
options.next = next | ||
} else { | ||
options = {dispatch, next} | ||
} | ||
let stores = !Array.isArray(store) ? [store] : store | ||
let state = stores.reduce((state, store) => store(state)) | ||
@@ -31,4 +32,10 @@ let rafCalled = false | ||
const element = component(Object.assign({state}, options)) | ||
let app = {state} | ||
Object.keys(options).forEach(function (prop) { | ||
app[prop] = options[prop] | ||
}) | ||
const element = component(app) | ||
if (element != null) { | ||
@@ -35,0 +42,0 @@ diff(target, element) |
{ | ||
"name": "@erickmerchant/framework", | ||
"version": "10.0.1", | ||
"version": "10.0.2", | ||
"description": "A simple data down, actions up framework.", | ||
@@ -5,0 +5,0 @@ "main": "main.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7385
104