Defensive JavaScript. Access what you need from storage once, and then lock the API.
1 comment
You would wrap this whole thing in a class constructor, instantiate it once (as soon as possible), and then use methods on the class instance to make it do what you want without exposing the value.
0
0
18 February at 20:12 | Open on gleasonator.com
|