Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function resetToDefault(current, defaults) {
- for(var prop in current) {
- if(current.hasOwnProperty(prop)) {
- if(defaults.hasOwnProperty(prop)) {
- current[prop] = defaults[prop];
- } else {
- delete current[prop];
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement