add path id util

This commit is contained in:
davidwells 2018-06-11 21:26:54 -07:00
parent 4c794b23f3
commit 5a0a7e495c
5 changed files with 16 additions and 7 deletions

4
functions/utils/getId.js Normal file
View file

@ -0,0 +1,4 @@
export default function getId(urlPath) {
return urlPath.match(/([^\/]*)\/*$/)[0]
}