/**
 * Checks if `value` is an Error object.
 *
 * @param value The value to check.
 * @returns Returns `true` if `value` is an Error object, `false` otherwise.
 *
 * @example
 * ```typescript
 * console.log(isError(new Error())); // true
 * console.log(isError('Error')); // false
 * console.log(isError({ name: 'Error', message: '' })); // false
 * ```
 */
export function isError(value: unknown): value is Error {
  return value instanceof Error;
}
