Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getBounds(shape) {
return pick(shape, [ 'x', 'y', 'width', 'height' ]);
}
function getPosition(s) {
return pick(getBounds(s), POSITION_ATTRS);
}
function getDimensions(s) {
return pick(getBounds(s), DIMENSION_ATTRS);
}
function extractPoints(point) {
return pick(point, POSITION_ATTRS);
}
function getBounds(element) {
return pick(element, [ 'x', 'y', 'width', 'height' ]);
}
function getBounds(element) {
return pick(element, [ 'x', 'y', 'width', 'height' ]);
}
function getBounds(element) {
return pick(element, [ 'x', 'y', 'width', 'height' ]);
}
Resize.prototype.canResize = function(context) {
var rules = this._rules;
var ctx = pick(context, [ 'newBounds', 'shape', 'delta', 'direction' ]);
return rules.allowed('shape.resize', ctx);
};
function createFile(oldFile, newFile) {
if (!newFile) {
newFile = oldFile;
oldFile = {};
} else {
oldFile = pick(oldFile, FILE_PROPERTIES);
}
newFile = pick(newFile, FILE_PROPERTIES);
if (newFile.path) {
newFile.name = path.basename(newFile.path);
}
return assign({}, oldFile, newFile);
}