Categories
type alias TargetFilter

A matcher for filter, tested against a candidate target path such as ./dist/internal-qo9O8jzH.js. A target is kept only when every matcher accepts it.

Examples

Example 1

import type { TargetFilter } from 'jsr:@kjanat/importmapify';

// Drop hashed internal chunks like ./dist/internal-qo9O8jzH.js.
const filter: readonly TargetFilter[] = [/^(?!.*internal)/];

Definition

RegExp | ((target: string) => boolean)