UNPKG

@luminati-io/knex

Version:

A batteries-included SQL query & schema builder for PostgresSQL, MySQL, CockroachDB, MSSQL and SQLite3

10 lines (8 loc) 250 B
const getPackageType = require('get-package-type'); module.exports = async function isModuleType(filepath) { return ( filepath.endsWith('.mjs') || (!filepath.endsWith('.cjs') && (await getPackageType(filepath)) === 'module') ); };