@webdeveric/utils
    Preparing search index...

    Function assertIsSymbol

    • Assert that input is a symbol.

      Parameters

      • input: unknown
      • error: string | Error = 'input is not a symbol'

      Returns asserts input is symbol

      assertIsSymbol(Symbol('id')); // does not throw
      assertIsSymbol('id'); // throws TypeError: input is not a symbol