You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
268 B
17 lines
268 B
4 years ago
|
"use strict";
|
||
|
|
||
|
var keys = require("./keys");
|
||
|
|
||
|
module.exports = function (obj) {
|
||
|
var error;
|
||
|
keys(obj).forEach(function (key) {
|
||
|
try {
|
||
|
delete this[key];
|
||
|
} catch (e) {
|
||
|
if (!error) error = e;
|
||
|
}
|
||
|
}, obj);
|
||
|
if (error !== undefined) throw error;
|
||
|
return obj;
|
||
|
};
|