UNPKG

@scriptables/manifest

Version:

Utilities to generate, parse, and update manifest headers in Scriptable scripts.

11 lines (10 loc) 493 B
import { SCRIPTABLE_BANNER_KEYS } from "./types.js"; function bannerManifestRegex(attrs = []) { attrs = attrs.length ? attrs : [...SCRIPTABLE_BANNER_KEYS]; const text = attrs.join("|"); return new RegExp(`(?:^|\\s)(${text}+):\\s*([^;]+);`, "g"); } const REGEXP_BANNER_MANIFEST = bannerManifestRegex([...SCRIPTABLE_BANNER_KEYS]); export { REGEXP_BANNER_MANIFEST, bannerManifestRegex }; //# sourceMappingURL=bannerManifestRegex.js.map //# sourceMappingURL=bannerManifestRegex.js.map