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