|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 13 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
862 bytes
|
| Rev | Line | |
|---|
| [9af201e] | 1 | "use strict";
|
|---|
| 2 | Object.defineProperty(exports, "__esModule", {
|
|---|
| 3 | value: true
|
|---|
| 4 | });
|
|---|
| 5 | Object.defineProperty(exports, "parseGlob", {
|
|---|
| 6 | enumerable: true,
|
|---|
| 7 | get: function() {
|
|---|
| 8 | return parseGlob;
|
|---|
| 9 | }
|
|---|
| 10 | });
|
|---|
| 11 | const _globparent = /*#__PURE__*/ _interop_require_default(require("glob-parent"));
|
|---|
| 12 | function _interop_require_default(obj) {
|
|---|
| 13 | return obj && obj.__esModule ? obj : {
|
|---|
| 14 | default: obj
|
|---|
| 15 | };
|
|---|
| 16 | }
|
|---|
| 17 | function parseGlob(pattern) {
|
|---|
| 18 | let glob = pattern;
|
|---|
| 19 | let base = (0, _globparent.default)(pattern);
|
|---|
| 20 | if (base !== ".") {
|
|---|
| 21 | glob = pattern.substr(base.length);
|
|---|
| 22 | if (glob.charAt(0) === "/") {
|
|---|
| 23 | glob = glob.substr(1);
|
|---|
| 24 | }
|
|---|
| 25 | }
|
|---|
| 26 | if (glob.substr(0, 2) === "./") {
|
|---|
| 27 | glob = glob.substr(2);
|
|---|
| 28 | } else if (glob.charAt(0) === "/") {
|
|---|
| 29 | glob = glob.substr(1);
|
|---|
| 30 | }
|
|---|
| 31 | return {
|
|---|
| 32 | base,
|
|---|
| 33 | glob
|
|---|
| 34 | };
|
|---|
| 35 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.