function inspect( files, clbk ) {
	var total;
	var out;
	var i;

	total = files.length;
	i = -1;
	out = [];

	return next();

	/**
	* Inspects the next package.
	*
	* @private
	*/
	function next() {
		i += 1;
		debug( 'Inspecting package %d of %d: %s', i+1, total, files[ i ] );

		debug( 'Checking for WebAssembly...' );
		readJSON( files[ i ], onJSON );
	}

	/**
	* Callback invoked after reading a package's `package.json` file.
	*
	* @private
	* @param {(Error|null)} error - error object
	* @param {JSON} pkg - package meta data
	* @returns {void}
	*/
	function onJSON( error, pkg ) {
		var j = i + 1;
		if ( error ) {
			debug( 'Encountered an error when searching for WebAssembly: %s (%d of %d). Error: %s', files[ i ], j, total, error.message );
		} else if ( pkg.__stdlib__ && pkg.__stdlib__.wasm ) { // eslint-disable-line no-underscore-dangle
			debug( 'Detected WebAssembly.' );
			out.push( dirname( files[ i ] ) );
		} else {
			debug( 'Unable to detect WebAssembly.' );
		}
		return done();
	}

	/**
	* Callback invoked upon inspecting all packages.
	*
	* @private
	* @returns {void}
	*/
	function done() {
		var j = i + 1;
		if ( j < total ) {
			debug( 'Inspected %d of %d packages.', j, total );
			return next();
		}
		debug( 'Successfully inspected all packages.' );
		return clbk( null, out );
	}
}
Inspects packages for WebAssembly.

@private
@param {StringArray} files - list of `package.json` files
@param {Callback} clbk - callback to invoke upon completion
@returns {void}