UNPKG

cspell

Version:
20 lines 602 B
import { getSystemFeatureFlags } from 'cspell-lib'; export function getFeatureFlags() { return getSystemFeatureFlags(); } export function parseFeatureFlags(flags, featureFlags = getFeatureFlags()) { if (!flags) return featureFlags; const flagsKvP = flags.map((f) => f.split(':', 2)); for (const flag of flagsKvP) { const [name, value] = flag; try { featureFlags.setFlag(name, value); } catch (e) { console.warn(`Unknown flag: "${name}"`); } } return featureFlags; } //# sourceMappingURL=featureFlags.js.map