bin/pre-commit-hook.js
function parseGitDiffToPathArray( command ) {
	return execSync( command, { encoding: 'utf8' } )
		.split( '\n' )
		.map( name => name.trim() )
		.filter( name => /(?:\.json|\.[jt]sx?|\.scss)$/.test( name ) );
}
function parseGitDiffToPathArray( command ) {
	return execSync( command, { encoding: 'utf8' } )
		.split( '\n' )
		.map( name => name.trim() )
		.filter( name => /(?:\.json|\.[jt]sx?|\.scss)$/.test( name ) );
}
Parses the output of a git diff command into javascript file paths.

@param   {String} command Command to run. Expects output like `git diff --name-only […]`
@returns {Array}          Paths output from git command