@webdeveric/utils
    Preparing search index...

    Function getPackageName

    • Extract the package name, including any scope, from input.

      Parameters

      • input: string

      Returns string | undefined

      getPackageName('@scope/name/sub/path'); // '@scope/name'
      getPackageName('lodash/fp'); // 'lodash'