import { match } from 'path-to-regexp'; import * as R from 'ramda'; export const isSamePath = (pathname: string, path: string) => { if(path.indexOf("/:") >= 0) { const res = match(path)(pathname); return !R.isEmpty(res); } else { return pathname === path; } };