Create scripts/store/setters

This commit is contained in:
Aleksandr Statciuk
2021-12-12 07:12:06 +03:00
parent df6af6dec0
commit 7255ab8335
13 changed files with 156 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
module.exports = function ({ title, resolution = {} }) {
if (title) {
const [_, h] = title.match(/\((\d+)P\)/i) || [null, null]
return h ? { height: parseInt(h), width: null } : resolution
}
return resolution
}