function transform( files ) {
	var match;
	var out;
	var f;
	var i;

	out = [];
	for ( i = 0; i < files.length; i++ ) {
		f = files[ i ];
		match = f.match( MATCH );
		if ( match ) {
			out.push({
				'dir': dirname( f ),
				'pkg': dirname( f.substring( match.index ) )
			});
		}
	}
	return out;
}
Transforms a raw `package.json` list into package names and associated data.

@private
@param {StringArray} files - list of `package.json` absolute file paths
@returns {ObjectArray} list of package names and associated data

@example
var files = [ '/stdlib/stdlib/lib/node_modules/@stdlib/constants/float64/min-safe-integer/package.json' ];

var names = transform( files );
// returns [ { 'dir': '...', 'pkg': '...' } ]