Ensure isPureAnnotated returns a boolean

This commit is contained in:
Brian Ng 2018-01-20 13:42:49 -06:00
parent 5ce54799ff
commit 193bccc93c
No known key found for this signature in database
GPG Key ID: 3F2380E1E1508CA9

View File

@ -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) {