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

10 lines (7 loc) 278 B
'use strict'; const path = require('path'); /** * Returns the path to a node modules root directory (not the main file path) * @param {string} moduleName - name of a node module */ module.exports = moduleName => path.dirname(require.resolve(`${moduleName}/package.json`));