mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-01-31 15:26:17 +00:00
11 lines
304 B
JavaScript
11 lines
304 B
JavaScript
|
|
var { promisify } = require('util');
|
|
var { extname } = require('path');
|
|
var svgDim = promisify(require('svg-dimensions').get);
|
|
var imgDim = promisify(require('image-size'));
|
|
|
|
module.exports = exports = async (fpath) => {
|
|
if (extname(fpath) === '.svg') return svgDim(fpath);
|
|
return imgDim(fpath);
|
|
};
|