- 响应式设计,支持桌面端和手机端自适应 - 首页展示轮播图、推荐歌单、热门歌曲、新碟上架、热门歌手 - 歌曲/歌手/专辑/歌单详情页 - 底部播放器:播放/暂停、上下首、进度拖动、音量控制 - 歌词同步滚动显示 - 搜索功能 - 后台管理 /admin - JSON文件存储
Path-to-RegExp
Turn an Express-style path string such as /user/:name into a regular expression.
Note: This is a legacy branch. You should upgrade to 1.x.
Usage
var pathToRegexp = require('path-to-regexp');
pathToRegexp(path, keys, options)
- path A string in the express format, an array of such strings, or a regular expression
- keys An array to be populated with the keys present in the url. Once the function completes, this will be an array of strings.
- options
- options.sensitive Defaults to false, set this to true to make routes case sensitive
- options.strict Defaults to false, set this to true to make the trailing slash matter.
- options.end Defaults to true, set this to false to only match the prefix of the URL.
var keys = [];
var exp = pathToRegexp('/foo/:bar', keys);
//keys = ['bar']
//exp = /^\/foo\/(?:([^\/]+?))\/?$/i
Live Demo
You can see a live demo of this library in use at express-route-tester.
License
MIT