stylelint
Version:
A mighty, modern CSS linter.
13 lines (10 loc) • 331 B
JavaScript
;
const util = require('util');
/**
* @param {unknown} error
* @returns {error is NodeJS.ErrnoException}
*/
module.exports = function isPathNotFoundError(error) {
// @ts-expect-error -- TS2339: Property 'code' does not exist on type 'Error'.
return util.types.isNativeError(error) && error.code === 'ENOENT';
};