netlify-faunadb-example2/functions/utils/getId.js
2018-06-11 21:26:54 -07:00

4 lines
86 B
JavaScript

export default function getId(urlPath) {
return urlPath.match(/([^\/]*)\/*$/)[0]
}