mznjs API Documentation - v0.0.31-beta.5
    Preparing search index...

    Function isExpired

    • 判断给定的过期时间是否已过期

      Parameters

      • Optionalexpires: string | number | { ttl: string | number }

        过期时间,可以是一个数字、字符串或包含 ttl 属性的对象 - 数字:表示过期时间(秒) - 字符串:表示过期时间,过期时间字符串(例如 '1h' 表示 1 小时) - 1s 1秒 1m 1分钟 1h 1小时 1d 1天 1w 1周 1M 1月 1y 1年 - 对象:包含 ttl 属性,ttl 可以是数字或字符串 - 如果 expires 为空、'permanent'、-1 或 '-1',表示永不过期

      Returns number | "permanent"

      返回过期时间(秒)或 'permanent'(表示永不过期)