cascade-extend 1.0.4 → 2.1.0
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/dist/index.d.ts +0 -1
- package/dist/index.js +4 -10
- package/package.json +18 -24
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
export declare function cascadeExtendKeys(scope: object, source: object | undefined, prefix?: string, sep?: string): string[] | undefined;
|
|
2
2
|
export declare function cascadeExtend(scope: object, source: object | undefined, prefix?: string, sep?: string): object | undefined;
|
|
3
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cascadeExtend = exports.cascadeExtendKeys = void 0;
|
|
4
|
-
const extend_1 = require("@cabloy/extend");
|
|
1
|
+
import { extend } from '@cabloy/extend';
|
|
5
2
|
const __SepDefault = '.';
|
|
6
|
-
function cascadeExtendKeys(scope, source, prefix, sep = __SepDefault) {
|
|
3
|
+
export function cascadeExtendKeys(scope, source, prefix, sep = __SepDefault) {
|
|
7
4
|
if (!source)
|
|
8
5
|
return undefined;
|
|
9
6
|
if (prefix === undefined)
|
|
@@ -30,8 +27,7 @@ function cascadeExtendKeys(scope, source, prefix, sep = __SepDefault) {
|
|
|
30
27
|
// ok
|
|
31
28
|
return keys.length === 0 ? undefined : keys;
|
|
32
29
|
}
|
|
33
|
-
|
|
34
|
-
function cascadeExtend(scope, source, prefix, sep = __SepDefault) {
|
|
30
|
+
export function cascadeExtend(scope, source, prefix, sep = __SepDefault) {
|
|
35
31
|
if (!source)
|
|
36
32
|
return undefined;
|
|
37
33
|
// keys
|
|
@@ -44,9 +40,7 @@ function cascadeExtend(scope, source, prefix, sep = __SepDefault) {
|
|
|
44
40
|
// extend
|
|
45
41
|
const result = {};
|
|
46
42
|
for (const key of keys) {
|
|
47
|
-
|
|
43
|
+
extend(true, result, source[key]);
|
|
48
44
|
}
|
|
49
45
|
return result;
|
|
50
46
|
}
|
|
51
|
-
exports.cascadeExtend = cascadeExtend;
|
|
52
|
-
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,17 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cascade-extend",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "2.1.0",
|
|
4
5
|
"description": "cascade-extend",
|
|
5
6
|
"publishConfig": {
|
|
6
7
|
"access": "public"
|
|
7
8
|
},
|
|
9
|
+
"author": "zhennann",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"homepage": "https://github.com/zhennann/cascade-extend#readme",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/zhennann/cascade-extend.git"
|
|
15
|
+
},
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/zhennann/cascade-extend/issues"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"cabloy",
|
|
21
|
+
"cascade-extend"
|
|
22
|
+
],
|
|
8
23
|
"exports": {
|
|
9
24
|
".": {
|
|
10
25
|
"types": [
|
|
11
26
|
"./src/index.ts",
|
|
12
27
|
"./dist/index.d.ts"
|
|
13
28
|
],
|
|
14
|
-
"import": "./src/index.ts",
|
|
15
29
|
"default": "./dist/index.js"
|
|
16
30
|
},
|
|
17
31
|
"./package.json": "./package.json"
|
|
@@ -19,27 +33,7 @@
|
|
|
19
33
|
"files": [
|
|
20
34
|
"dist"
|
|
21
35
|
],
|
|
22
|
-
"repository": {
|
|
23
|
-
"type": "git",
|
|
24
|
-
"url": "git+https://github.com/zhennann/cascade-extend.git"
|
|
25
|
-
},
|
|
26
|
-
"keywords": [
|
|
27
|
-
"egg",
|
|
28
|
-
"egg-born",
|
|
29
|
-
"cabloy",
|
|
30
|
-
"cascade-extend"
|
|
31
|
-
],
|
|
32
|
-
"author": "zhennann",
|
|
33
|
-
"license": "MIT",
|
|
34
|
-
"bugs": {
|
|
35
|
-
"url": "https://github.com/zhennann/cascade-extend/issues"
|
|
36
|
-
},
|
|
37
|
-
"homepage": "https://github.com/zhennann/cascade-extend#readme",
|
|
38
|
-
"devDependencies": {
|
|
39
|
-
"@cabloy/lint": "^4.0.5"
|
|
40
|
-
},
|
|
41
36
|
"dependencies": {
|
|
42
|
-
"@cabloy/extend": "^3.0
|
|
43
|
-
}
|
|
44
|
-
"scripts": {}
|
|
37
|
+
"@cabloy/extend": "^3.1.0"
|
|
38
|
+
}
|
|
45
39
|
}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,MAAM,CAAC,EAAE,MAAM,EACf,GAAG,GAAE,MAAqB,GACzB,MAAM,EAAE,GAAG,SAAS,CAqBtB;AAED,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,MAAM,CAAC,EAAE,MAAM,EACf,GAAG,GAAE,MAAqB,GACzB,MAAM,GAAG,SAAS,CAapB"}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AAExC,MAAM,YAAY,GAAG,GAAG,CAAC;AAEzB,SAAgB,iBAAiB,CAC/B,KAAa,EACb,MAA0B,EAC1B,MAAe,EACf,MAAc,YAAY;IAE1B,IAAI,CAAC,MAAM;QAAE,OAAO,SAAS,CAAC;IAC9B,IAAI,MAAM,KAAK,SAAS;QAAE,MAAM,GAAG,EA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