path-to-regexp快速拆分 url 路径中的参数信息

介绍一个小工具 path-to-regexp 用于快速拆解url path中的部分,贴别适合restful接口中快速获取对应的实体参数

 git地址可以参考 https://github.com/pillarjs/path-to-regexp

 

具体更多看官网介绍

 

能很快的拿到想要的信息,如 id .....

 

posted @ 2017-09-27 09:56  前端js  阅读(1209)  评论(0编辑  收藏  举报