@ray-js/library 1.5.40 → 1.5.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/regexp/NamedRegexp.js +2 -0
- package/lib/url/format.js +1 -1
- package/lib/url/params.js +0 -1
- package/lib/url/parse.js +3 -1
- package/lib/url/queryStringify.js +3 -1
- package/lib/url/searchParse.js +2 -2
- package/package.json +3 -3
package/lib/url/format.js
CHANGED
|
@@ -10,5 +10,5 @@ export default function format(attrs) {
|
|
|
10
10
|
search = ''
|
|
11
11
|
} = attrs;
|
|
12
12
|
const searchQuery = searchParse(search);
|
|
13
|
-
return
|
|
13
|
+
return `${origin}${pathname}${queryStringify(_objectSpread(_objectSpread({}, query), searchQuery))}${hash}`;
|
|
14
14
|
}
|
package/lib/url/params.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
const _excluded = ["query"];
|
|
4
|
-
import "core-js/modules/web.dom-collections.iterator.js";
|
|
5
4
|
import merge from 'merge';
|
|
6
5
|
import parse from './parse';
|
|
7
6
|
import format from './format';
|
package/lib/url/parse.js
CHANGED
|
@@ -2,6 +2,8 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
const _excluded = ["pathname"],
|
|
4
4
|
_excluded2 = ["____h_a_s_h____"];
|
|
5
|
+
import "core-js/modules/esnext.iterator.constructor.js";
|
|
6
|
+
import "core-js/modules/esnext.iterator.for-each.js";
|
|
5
7
|
import { NamedRegexp } from '../regexp';
|
|
6
8
|
import searchParse from './searchParse';
|
|
7
9
|
import format from './format';
|
|
@@ -42,7 +44,7 @@ export default function parse(href) {
|
|
|
42
44
|
res.query = query;
|
|
43
45
|
if (____h_a_s_h____) {
|
|
44
46
|
// 剔除 ____h_a_s_h____
|
|
45
|
-
res.hash = res.hash ||
|
|
47
|
+
res.hash = res.hash || `#${____h_a_s_h____}`;
|
|
46
48
|
res.search = format({
|
|
47
49
|
query
|
|
48
50
|
});
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import "core-js/modules/esnext.iterator.constructor.js";
|
|
2
|
+
import "core-js/modules/esnext.iterator.for-each.js";
|
|
1
3
|
export default function queryStringify(query) {
|
|
2
4
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
3
5
|
const {
|
|
@@ -12,5 +14,5 @@ export default function queryStringify(query) {
|
|
|
12
14
|
const value = query[key];
|
|
13
15
|
search.push([key, value].join('='));
|
|
14
16
|
});
|
|
15
|
-
return
|
|
17
|
+
return `${prefix ? '?' : ''}${search.join('&')}`;
|
|
16
18
|
}
|
package/lib/url/searchParse.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "core-js/modules/
|
|
2
|
-
import "core-js/modules/
|
|
1
|
+
import "core-js/modules/esnext.iterator.constructor.js";
|
|
2
|
+
import "core-js/modules/esnext.iterator.for-each.js";
|
|
3
3
|
/**
|
|
4
4
|
* 分割url search key value,返回 [key, value]
|
|
5
5
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ray-js/library",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.41",
|
|
4
4
|
"description": "Ray library for browser",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ray"
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"merge": "^2.1.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@ray-js/cli": "1.5.
|
|
29
|
+
"@ray-js/cli": "1.5.41"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public",
|
|
33
33
|
"registry": "https://registry.npmjs.com"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "08f9269589769f029e63b3835dfa92b48c6a6f15"
|
|
36
36
|
}
|