mirror of
https://github.com/github/codeql-action.git
synced 2026-01-04 21:50:17 +08:00
18 lines
369 B
JavaScript
18 lines
369 B
JavaScript
"use strict";
|
|
|
|
const walkObject = require("./util/core/walk-object");
|
|
|
|
function filter(object, property) {
|
|
return object[property].restore && object[property].restore.sinon;
|
|
}
|
|
|
|
function restore(object, property) {
|
|
object[property].restore();
|
|
}
|
|
|
|
function restoreObject(object) {
|
|
return walkObject(restore, object, filter);
|
|
}
|
|
|
|
module.exports = restoreObject;
|