1 | ;
|
2 |
|
3 | require("core-js/modules/es.regexp.exec.js");
|
4 |
|
5 | require("core-js/modules/es.string.match.js");
|
6 |
|
7 | Object.defineProperty(exports, "__esModule", {
|
8 | value: true
|
9 | });
|
10 | exports.default = pathToId;
|
11 |
|
12 | function pathToId(path) {
|
13 | var match = (path || '').match(/^\/story\/(.+)/);
|
14 |
|
15 | if (!match) {
|
16 | throw new Error("Invalid path '".concat(path, "', must start with '/story/'"));
|
17 | }
|
18 |
|
19 | return match[1];
|
20 | } |
\ | No newline at end of file |