IFClite TypeScript API
    Preparing search index...

    Function unsafeNamePatternReason

    • Returns a human-readable rejection reason when source is not safe to compile and run .test() with, or undefined when it's fine. Pure, never throws — delegates to @ifc-lite/regex-guard's assertGuardedRegexPattern so this matcher shares the same catastrophic-backtracking-shape and length-cap checks as @ifc-lite/ids, @ifc-lite/extensions and @ifc-lite/mutations, instead of carrying its own copy. Exposed so a caller that wants to reject a dangerous pattern WITHOUT triggering compileNameMatcher's throw (e.g. a live "does this pattern look right" preview) can check first.

      Parameters

      • source: string

      Returns string | undefined