can you write this in "node" style:

````javascript
if (xxx) {
  return util.format(LINK_TAG, ...);
}

return util.format(SCRIPT_TAG, ...);
````

Also, change the regexp to not match `/some.css/folder/file.js`:
````
if (/\.css$/.test(filePath))
````