source: trip-planner-front/node_modules/@npmcli/run-script/lib/is-server-package.js@ ceaed42

Last change on this file since ceaed42 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 314 bytes
Line 
1const util = require('util')
2const fs = require('fs')
3const { stat } = fs.promises || { stat: util.promisify(fs.stat) }
4const { resolve } = require('path')
5module.exports = async path => {
6 try {
7 const st = await stat(resolve(path, 'server.js'))
8 return st.isFile()
9 } catch (er) {
10 return false
11 }
12}
Note: See TracBrowser for help on using the repository browser.