securityos/node_modules/stylelint/lib/utils/isPathNotFoundError.js

12 lines
270 B
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
'use strict';
const util = require('util');
/**
* @param {unknown} error
* @returns {error is NodeJS.ErrnoException}
*/
module.exports = function isPathNotFoundError(error) {
return util.types.isNativeError(error) && 'code' in error && error.code === 'ENOENT';
};