1
This commit is contained in:
22
bourse_app/node_modules/fancy-canvas/size.js
generated
vendored
Normal file
22
bourse_app/node_modules/fancy-canvas/size.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.equalSizes = exports.size = void 0;
|
||||
function size(_a) {
|
||||
var width = _a.width, height = _a.height;
|
||||
if (width < 0) {
|
||||
throw new Error('Negative width is not allowed for Size');
|
||||
}
|
||||
if (height < 0) {
|
||||
throw new Error('Negative height is not allowed for Size');
|
||||
}
|
||||
return {
|
||||
width: width,
|
||||
height: height,
|
||||
};
|
||||
}
|
||||
exports.size = size;
|
||||
function equalSizes(first, second) {
|
||||
return (first.width === second.width) &&
|
||||
(first.height === second.height);
|
||||
}
|
||||
exports.equalSizes = equalSizes;
|
||||
Reference in New Issue
Block a user