Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function set_global_state(params) {
var old = {
stores: attributes.__stores,
applyAttr: attributes[symbols.default],
deleted: notifications.nodesDeleted,
}
attributes.__stores = store_handler(params)
attributes[symbols.default] = applyAttribute
notifications.nodesDeleted = cleanup_stores
return old
}
function clean_global_state(old) {
notifications.nodesDeleted = old.deleted
attributes[symbols.default] = old.applyAttr
attributes.__stores = old.stores
}