isPathNotFoundError.cjs 449 B

123456789101112131415
  1. // NOTICE: This file is generated by Rollup. To modify it,
  2. // please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
  3. 'use strict';
  4. const node_util = require('node:util');
  5. /**
  6. * @param {unknown} error
  7. * @returns {error is NodeJS.ErrnoException}
  8. */
  9. function isPathNotFoundError(error) {
  10. return node_util.types.isNativeError(error) && 'code' in error && error.code === 'ENOENT';
  11. }
  12. module.exports = isPathNotFoundError;