mirror of
https://github.com/lazuscripts/utility.git
synced 2024-11-16 03:14:21 +00:00
settings.delete fn
This commit is contained in:
parent
b5350afe53
commit
821a83c129
@ -64,6 +64,15 @@ settings = {
|
||||
cache[setting.name] = setting
|
||||
settings[setting.name] = totype setting.value
|
||||
return settings
|
||||
|
||||
delete: (name) ->
|
||||
setting = cache[name]
|
||||
unless setting
|
||||
setting = Settings\find :name
|
||||
if setting
|
||||
setting\delete!
|
||||
cache[name] = nil
|
||||
settings[name] = nil
|
||||
}
|
||||
|
||||
return setmetatable settings, {
|
||||
|
Loading…
Reference in New Issue
Block a user