isSnapshotEnabled
isSnapshotEnabled(tags) applies the tag rule of Automatic snapshots.
visAnnotations calls it for every story.
import { isSnapshotEnabled } from 'storybook-addon-vis'
isSnapshotEnabled(['snapshot']) // trueisSnapshotEnabled(['snapshot', '!snapshot']) // falseisSnapshotEnabled(['!snapshot', 'snapshot']) // trueisSnapshotEnabled([]) // falseSignature
Section titled “Signature”function isSnapshotEnabled(tags: string[]): boolean- With neither
snapshotnor!snapshotin the tags, the result isfalse. - Otherwise the tag that appears last wins.