is.js 216 B

1234
  1. // not an airtight indicator, but a good gut-check to even bother trying
  2. const { stat } = require('fs/promises')
  3. module.exports = ({ cwd = process.cwd() } = {}) =>
  4. stat(cwd + '/.git').then(() => true, () => false)