Ensure isPureAnnotated returns a boolean
This commit is contained in:
@@ -3,7 +3,7 @@ import * as t from "@babel/types";
|
||||
const PURE_ANNOTATION = "#__PURE__";
|
||||
|
||||
const isPureAnnotated = ({ leadingComments }) =>
|
||||
leadingComments &&
|
||||
!!leadingComments &&
|
||||
leadingComments.some(comment => /[@#]__PURE__/.test(comment.value));
|
||||
|
||||
export default function annotateAsPure(pathOrNode) {
|
||||
|
||||
Reference in New Issue
Block a user