@wdprlib/decompiler
    Preparing search index...

    Function hasOnlyStyleProperty

    • Check whether a CSS style string contains exactly one property matching the given name.

      Parameters

      • style: string
      • property: string

      Returns boolean

      hasOnlyStyleProperty("font-size: 20px", "font-size")          // true
      hasOnlyStyleProperty("font-size: 20px; color: red", "font-size") // false