Test/node_modules/image-blob-reduce/lib/utils.js
2026-04-09 22:54:00 +07:00

42 lines
740 B
JavaScript

'use strict';
module.exports.assign = function assign(to) {
var from;
for (var s = 1; s < arguments.length; s++) {
from = Object(arguments[s]);
for (var key in from) {
if (Object.prototype.hasOwnProperty.call(from, key)) to[key] = from[key];
}
}
return to;
};
function pick(from, props) {
var to = {};
props.forEach(function (key) {
if (Object.prototype.hasOwnProperty.call(from, key)) to[key] = from[key];
});
return to;
}
function pick_pica_resize_options(from) {
return pick(from, [
'alpha',
'unsharpAmount',
'unsharpRadius',
'unsharpThreshold',
'cancelToken'
]);
}
module.exports.pick = pick;
module.exports.pick_pica_resize_options = pick_pica_resize_options;