github-pages-deploy-action/node_modules/mimic-fn/index.js

10 lines
304 B
JavaScript
Raw Normal View History

2020-01-28 13:07:56 +08:00
'use strict';
2020-03-07 11:45:40 +08:00
module.exports = (to, from) => {
// TODO: use `Reflect.ownKeys()` when targeting Node.js 6
for (const prop of Object.getOwnPropertyNames(from).concat(Object.getOwnPropertySymbols(from))) {
2020-01-28 13:07:56 +08:00
Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
}
return to;
};