diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2025-09-03 17:24:21 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-09-03 17:24:21 -0300 |
commit | 402e792e28a2fd872e7581c8e005ebb35a3eab36 (patch) | |
tree | 0557eb38620ae65df3ed6b913684ba6e16d7ae6b /src/data/composite/wiki-properties/canonicalBase.js | |
parent | c7f6383e34c30b63e0e0b86f320f42f2c9a0bdb7 (diff) |
data: WikiInfo.canonicalMediaBase
Diffstat (limited to 'src/data/composite/wiki-properties/canonicalBase.js')
-rw-r--r-- | src/data/composite/wiki-properties/canonicalBase.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/data/composite/wiki-properties/canonicalBase.js b/src/data/composite/wiki-properties/canonicalBase.js new file mode 100644 index 00000000..81740d6c --- /dev/null +++ b/src/data/composite/wiki-properties/canonicalBase.js @@ -0,0 +1,16 @@ +import {isURL} from '#validators'; + +export default function() { + return { + flags: {update: true, expose: true}, + update: {validate: isURL}, + expose: { + transform: (value) => + (value === null + ? null + : value.endsWith('/') + ? value + : value + '/'), + }, + }; +} |