protected function isLibrary(array $package) {
    // Add Swiftmailer support.
    if ($package['name'] == 'swiftmailer/swiftmailer') {
      $package['type'] = 'drupal-library';
    }

    $package_types = [
      'drupal-library',
      'bower-asset',
      'npm-asset',
    ];
    return (
      in_array($package['type'], $package_types) &&
      array_key_exists($package['name'], $this->rootPackage->getRequires())
    );
  }
protected function isLibrary(array $package) {
    // Add Swiftmailer support.
    if ($package['name'] == 'swiftmailer/swiftmailer') {
      $package['type'] = 'drupal-library';
    }

    $package_types = [
      'drupal-library',
      'bower-asset',
      'npm-asset',
    ];
    return (
      in_array($package['type'], $package_types) &&
      array_key_exists($package['name'], $this->rootPackage->getRequires())
    );
  }
protected function isLibrary ( array $ package ) { // Add Swiftmailer support. if ( $ package [ 'name' ] == 'swiftmailer/swiftmailer' ) { $ package [ 'type' ] = 'drupal-library' ; } $ package_types = [ 'drupal-library' , 'bower-asset' , 'npm-asset' , ] ; return ( in_array ( $ package [ 'type' ] , $ package_types ) && array_key_exists ( $ package [ 'name' ] , $ this -> rootPackage -> getRequires ( ) ) ) ; }
Determines if a package is an asset library.

@param array $package
The package info.

@return bool
TRUE if the package is an asset library, otherwise FALSE.
Determines if a package is an asset library .