Last change
on this file since 8d391a1 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
416 bytes
|
Line | |
---|
1 | /*
|
---|
2 | MIT License http://www.opensource.org/licenses/mit-license.php
|
---|
3 | Author Sam Chen @chenxsan
|
---|
4 | */
|
---|
5 |
|
---|
6 | "use strict";
|
---|
7 |
|
---|
8 | /**
|
---|
9 | * @param {string} urlAndGlobal the script request
|
---|
10 | * @returns {string[]} script url and its global variable
|
---|
11 | */
|
---|
12 | module.exports = function extractUrlAndGlobal(urlAndGlobal) {
|
---|
13 | const index = urlAndGlobal.indexOf("@");
|
---|
14 | return [urlAndGlobal.substring(index + 1), urlAndGlobal.substring(0, index)];
|
---|
15 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.