Skip to main content

Try it Live

Run Hardfork examples in the interactive playground

    Usage Patterns

    Feature Exclusion

    Exclude features not yet available:

    Network Configuration

    Check for pre-feature versions:

    Validation

    Validate against breaking changes:

    Chronological Ordering

    Uses chronological deployment order:

    Strict Inequality

    Important: isBefore returns false when versions are equal:
    For “less than or equal”, use lte or negate isAfter:

    Performance

    Time Complexity: O(1) - Array index comparison Typical Time: ~10-20ns per call

    See Also

    • isAtLeast - Check if greater than or equal
    • isAfter - Check if strictly greater than
    • lt - Alias for isBefore (less than)
    • lte - Less than or equal