formatPackages function

Map<String, String> formatPackages (
  1. Map<String, dynamic> json
)

Implementation

Map<String, String> formatPackages(Map<String, dynamic> json) {
  final dependencies = Map<String, dynamic>.from(json['dependencies'] ?? {});
  final devDependencies = Map<String, dynamic>.from(json['dev_dependencies'] ?? {});

  final all = {
    ...dependencies,
    ...devDependencies,
  };

  return filterPackages(all);
}