UNPKG

datoit

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: MongoDB, MySQL, MariaDB, PostgreSQL, SQLite

11 lines (8 loc) 283 B
'use strict'; module.exports = path => { if (typeof path !== 'string') throw new Error('admin.url must be a string'); if (path === '' || path === '/') return '/'; if (path[0] != '/') path = '/' + path; if (path[path.length - 1] != '/') path = path + '/'; return path; };