asr-active-state-watcher
Advanced tools
Comparing version 1.0.2 to 1.0.3
10
es5.js
'use strict'; | ||
module.exports = function magicalDomThingy(stateRouter) { | ||
module.exports = function createStateWatcher(stateRouter) { | ||
var currentDomApis = {}; | ||
@@ -9,4 +9,4 @@ var currentAttachListeners = []; | ||
function attachToState(_ref) { | ||
var state = _ref.state; | ||
var domApi = _ref.domApi; | ||
var state = _ref.state, | ||
domApi = _ref.domApi; | ||
@@ -20,4 +20,4 @@ currentDomApis[state.name] = domApi; | ||
function detachFromState(_ref2) { | ||
var state = _ref2.state; | ||
var domApi = _ref2.domApi; | ||
var state = _ref2.state, | ||
domApi = _ref2.domApi; | ||
@@ -24,0 +24,0 @@ if (!currentDomApis[state.name]) { |
@@ -1,2 +0,2 @@ | ||
module.exports = function magicalDomThingy(stateRouter) { | ||
module.exports = function createStateWatcher(stateRouter) { | ||
const currentDomApis = {} | ||
@@ -3,0 +3,0 @@ const currentAttachListeners = [] |
{ | ||
"name": "asr-active-state-watcher", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Waches an abstract-state-router and calls your function with all active DOM APIs", | ||
@@ -15,4 +15,3 @@ "main": "es5.js", | ||
"keywords": [ | ||
"abstract-state-router", | ||
"browserify" | ||
"abstract-state-router" | ||
], | ||
@@ -28,15 +27,3 @@ "author": "TehShrike", | ||
"babel-preset-es2015": "6.5.0" | ||
}, | ||
"jsnext:main": "index.js", | ||
"browser": "index.js", | ||
"browserify": { | ||
"transform": [ | ||
[ | ||
"babelify", | ||
{ | ||
"presets": "es2015" | ||
} | ||
] | ||
] | ||
} | ||
} |
@@ -13,7 +13,7 @@ So you start with an [abstract-state-router](https://github.com/TehShrike/abstract-state-router), right? | ||
const removeAttachListener = magicalDomThingy.addDomApiAttachListener(domApi => { | ||
const removeAttachListener = stateWatcher.addDomApiAttachListener(domApi => { | ||
domApi.get() // the starting state, probably! | ||
}) | ||
const removeDetachListener = magicalDomThingy.addDomApiDetachListener(domApi => { | ||
const removeDetachListener = stateWatcher.addDomApiDetachListener(domApi => { | ||
domApi.get() // the final state, presumably! | ||
@@ -20,0 +20,0 @@ }) |
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
4731
5