Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function create (state, callback) {
const State = (() => state)()
return onChange(State, callback)
}
export default (callback) => {
if (observer) return observer
observer = onchange(location, (_, value) => {
onProgramaticChange(value)
callback(observer)
})
callback(location)
return observer
}