UNPKG

hd-utils

Version:

A handy utils for modern JS developers

9 lines (8 loc) 353 B
/** * @description will return the url params of the passed Url * @example getUrlPathParams("www.example.com/1/2", {filterEmpty:true}) // ["1", "2"] * @example getUrlPathParams("www.example.com/1/2", {filterEmpty:false}) // ["", "1", "2"] */ export default function getUrlPathParams(url: string, options?: { filterEmpty?: boolean; }): string[];