add path id util
This commit is contained in:
parent
4c794b23f3
commit
5a0a7e495c
5 changed files with 16 additions and 7 deletions
4
functions/utils/getId.js
Normal file
4
functions/utils/getId.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
export default function getId(urlPath) {
|
||||
return urlPath.match(/([^\/]*)\/*$/)[0]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue