For less code and a more direct approach:

```js
return resourceSrc.split("/").pop();
```

No performance benefit, just clearer intention