UNPKG

@digicms/cms

Version:

An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MySQL, MariaDB, PostgreSQL, SQLite

12 lines (9 loc) 333 B
'use strict'; module.exports = (path) => { let tmpPath = path; if (typeof tmpPath !== 'string') throw new Error('admin.url must be a string'); if (tmpPath === '' || tmpPath === '/') return '/'; if (tmpPath[0] !== '/') tmpPath = `/${tmpPath}`; if (tmpPath[tmpPath.length - 1] !== '/') tmpPath += '/'; return tmpPath; };