res-pareto-build 0.9.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/api.generated.d.ts +15 -19
- package/dist/glossary/algorithmtypes.generated.d.ts +32 -27
- package/dist/glossary/datatypes.generated.d.ts +21 -13
- package/dist/implementation.generated.js +10 -14
- package/dist/implementations/buildArray.native.js +8 -6
- package/dist/implementations/buildSafeDictionary.native.d.ts +2 -0
- package/dist/implementations/{createSyncOverwritingDictionaryBuilder.native.js → buildSafeDictionary.native.js} +14 -2
- package/dist/implementations/buildUnsafeDictionary.native.d.ts +2 -0
- package/dist/implementations/{createSyncIgnoringDictionaryBuilder.native.js → buildUnsafeDictionary.native.js} +4 -6
- package/dist/implementations/createArrayBuilder.native.d.ts +2 -0
- package/dist/implementations/{createAsyncOverwritingDictionaryBuilder.native.js → createArrayBuilder.native.js} +14 -11
- package/dist/implementations/createSafeDictionaryBuilder.native.d.ts +2 -0
- package/dist/implementations/{unsafeSyncBuildDictionary.native.js → createSafeDictionaryBuilder.native.js} +34 -7
- package/dist/implementations/createUnsafeDictionaryBuilder.native.d.ts +2 -0
- package/dist/implementations/{createAsyncArrayBuilder.native.js → createUnsafeDictionaryBuilder.native.js} +17 -7
- package/package.json +4 -4
- package/dist/implementations/createAsyncArrayBuilder.native.d.ts +0 -2
- package/dist/implementations/createAsyncIgnoringDictionaryBuilder.native.d.ts +0 -2
- package/dist/implementations/createAsyncIgnoringDictionaryBuilder.native.js +0 -45
- package/dist/implementations/createAsyncOverwritingDictionaryBuilder.native.d.ts +0 -2
- package/dist/implementations/createSyncIgnoringDictionaryBuilder.native.d.ts +0 -2
- package/dist/implementations/createSyncOverwritingDictionaryBuilder.native.d.ts +0 -2
- package/dist/implementations/createUnsafeAsyncDictionaryBuilder.native.d.ts +0 -2
- package/dist/implementations/createUnsafeAsyncDictionaryBuilder.native.js +0 -42
- package/dist/implementations/unsafeSyncBuildDictionary.native.d.ts +0 -2
package/dist/api.generated.d.ts
CHANGED
@@ -1,26 +1,22 @@
|
|
1
1
|
import * as g_common from "glo-pareto-common";
|
2
2
|
import * as g_this from "./glossary";
|
3
|
+
export declare namespace D {
|
4
|
+
}
|
3
5
|
export declare namespace A {
|
4
|
-
type buildArray = g_this.SYNC.A.F.BuildArray;
|
5
|
-
type
|
6
|
-
type createAsyncIgnoringDictionaryBuilder = g_this.ASYNC.A.C.CreateSafeDictionaryBuilder;
|
7
|
-
type createAsyncOverwritingDictionaryBuilder = g_this.ASYNC.A.C.CreateSafeDictionaryBuilder;
|
8
|
-
type createSyncIgnoringDictionaryBuilder = ($d: {}, $se: {
|
9
|
-
readonly 'onDuplicate': g_common.SYNC.I.String;
|
10
|
-
}) => g_this.SYNC.A.F.BuildDictionary;
|
11
|
-
type createSyncOverwritingDictionaryBuilder = ($d: {}, $se: {
|
6
|
+
type buildArray = () => g_this.SYNC.A.F.BuildArray;
|
7
|
+
type buildSafeDictionary = ($: g_this.T.DictionaryBuildStrategy, $se: {
|
12
8
|
readonly 'onDuplicate': g_common.SYNC.I.String;
|
13
|
-
}) => g_this.SYNC.A.F.
|
14
|
-
type
|
15
|
-
type
|
9
|
+
}) => g_this.SYNC.A.F.BuildSafeDictionary;
|
10
|
+
type buildUnsafeDictionary = () => g_this.SYNC.A.F.BuildUnsafeDictionary;
|
11
|
+
type createArrayBuilder = () => g_this.ASYNC.A.C.CreateArrayBuilder;
|
12
|
+
type createSafeDictionaryBuilder = ($: g_this.T.DictionaryBuildStrategy) => g_this.ASYNC.A.C.CreateSafeDictionaryBuilder;
|
13
|
+
type createUnsafeDictionaryBuilder = () => g_this.ASYNC.A.C.CreateUnsafeDictionaryBuilder;
|
16
14
|
}
|
17
15
|
export type API = {
|
18
|
-
buildArray: A.buildArray;
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
createUnsafeAsyncDictionaryBuilder: A.createUnsafeAsyncDictionaryBuilder;
|
25
|
-
unsafeSyncBuildDictionary: A.unsafeSyncBuildDictionary;
|
16
|
+
readonly 'buildArray': A.buildArray;
|
17
|
+
readonly 'buildSafeDictionary': A.buildSafeDictionary;
|
18
|
+
readonly 'buildUnsafeDictionary': A.buildUnsafeDictionary;
|
19
|
+
readonly 'createArrayBuilder': A.createArrayBuilder;
|
20
|
+
readonly 'createSafeDictionaryBuilder': A.createSafeDictionaryBuilder;
|
21
|
+
readonly 'createUnsafeDictionaryBuilder': A.createUnsafeDictionaryBuilder;
|
26
22
|
};
|
@@ -2,55 +2,60 @@ import { T } from "./datatypes.generated";
|
|
2
2
|
import * as g_common from "glo-pareto-common";
|
3
3
|
export declare namespace ASYNC {
|
4
4
|
namespace I {
|
5
|
-
type Array<
|
6
|
-
type Dictionary<
|
7
|
-
type DuplicatesHandler
|
5
|
+
type Array<TEndType, TType> = ($: T.Array<TEndType, TType>) => void;
|
6
|
+
type Dictionary<TEndType, TType> = ($: T.Dictionary<TEndType, TType>) => void;
|
7
|
+
type DuplicatesHandler = {
|
8
8
|
'data': ($: g_common.T.String) => void;
|
9
9
|
'end': () => void;
|
10
10
|
};
|
11
|
-
type Elements<
|
12
|
-
'data': ($:
|
13
|
-
'end': () => void;
|
11
|
+
type Elements<TEndType, TType> = {
|
12
|
+
'data': ($: TType) => void;
|
13
|
+
'end': ($: TEndType) => void;
|
14
14
|
};
|
15
|
-
type Entries<
|
16
|
-
'data': ($: T.KeyValuePair<
|
17
|
-
'end': () => void;
|
15
|
+
type Entries<TEndType, TType> = {
|
16
|
+
'data': ($: T.KeyValuePair<TType>) => void;
|
17
|
+
'end': ($: TEndType) => void;
|
18
18
|
};
|
19
19
|
}
|
20
20
|
namespace A {
|
21
21
|
namespace C {
|
22
|
-
type CreateArrayBuilder =
|
23
|
-
'
|
24
|
-
|
22
|
+
type CreateArrayBuilder = {
|
23
|
+
'construct': <TEndType, TType>($is: {
|
24
|
+
readonly 'handler': ASYNC.I.Array<TEndType, TType>;
|
25
|
+
}) => ASYNC.I.Elements<TEndType, TType>;
|
26
|
+
};
|
25
27
|
}
|
26
28
|
namespace C {
|
27
|
-
type CreateSafeDictionaryBuilder =
|
28
|
-
'
|
29
|
-
|
30
|
-
|
29
|
+
type CreateSafeDictionaryBuilder = {
|
30
|
+
'construct': <TEndType, TType>($is: {
|
31
|
+
readonly 'duplicatesHandler': ASYNC.I.DuplicatesHandler;
|
32
|
+
readonly 'handler': ASYNC.I.Dictionary<TEndType, TType>;
|
33
|
+
}) => ASYNC.I.Entries<TEndType, TType>;
|
34
|
+
};
|
31
35
|
}
|
32
36
|
namespace C {
|
33
|
-
type CreateUnsafeDictionaryBuilder =
|
34
|
-
'
|
35
|
-
|
37
|
+
type CreateUnsafeDictionaryBuilder = {
|
38
|
+
'construct': <TEndType, TType>($is: {
|
39
|
+
readonly 'handler': ASYNC.I.Dictionary<TEndType, TType>;
|
40
|
+
}) => ASYNC.I.Entries<TEndType, TType>;
|
41
|
+
};
|
36
42
|
}
|
37
43
|
}
|
38
44
|
}
|
39
45
|
export declare namespace SYNC {
|
40
46
|
namespace I {
|
41
|
-
type Add<
|
42
|
-
type Push<
|
43
|
-
}
|
44
|
-
namespace IW {
|
45
|
-
type Add<GType> = ($c: ($b: I.Add<GType>) => void) => void;
|
46
|
-
type Push<GType> = ($c: ($b: I.Push<GType>) => void) => void;
|
47
|
+
type Add<TType> = ($: T.KeyValuePair<TType>) => void;
|
48
|
+
type Push<TType> = ($: TType) => void;
|
47
49
|
}
|
48
50
|
namespace A {
|
49
51
|
namespace F {
|
50
|
-
type BuildArray = <
|
52
|
+
type BuildArray = <TType>($c: ($i: SYNC.I.Push<TType>) => void) => g_common.T.Array<TType>;
|
53
|
+
}
|
54
|
+
namespace F {
|
55
|
+
type BuildSafeDictionary = <TType>($c: ($i: SYNC.I.Add<TType>) => void) => g_common.T.Dictionary<TType>;
|
51
56
|
}
|
52
57
|
namespace F {
|
53
|
-
type
|
58
|
+
type BuildUnsafeDictionary = <TType>($c: ($i: SYNC.I.Add<TType>) => void) => g_common.T.Dictionary<TType>;
|
54
59
|
}
|
55
60
|
}
|
56
61
|
}
|
@@ -1,27 +1,35 @@
|
|
1
|
-
import * as
|
1
|
+
import * as g_common from "glo-pareto-common";
|
2
|
+
export declare namespace N { }
|
2
3
|
export declare namespace T {
|
3
4
|
namespace Array {
|
4
|
-
type
|
5
|
+
type array<TEndType, TType> = g_common.T.Array<TType>;
|
6
|
+
type end<TEndType, TType> = TEndType;
|
5
7
|
}
|
6
|
-
type Array<
|
8
|
+
type Array<TEndType, TType> = {
|
9
|
+
readonly 'array': g_common.T.Array<TType>;
|
10
|
+
readonly 'end': TEndType;
|
11
|
+
};
|
7
12
|
namespace Dictionary {
|
8
|
-
type
|
13
|
+
type dictionary<TEndType, TType> = g_common.T.Dictionary<TType>;
|
14
|
+
type end<TEndType, TType> = TEndType;
|
9
15
|
}
|
10
|
-
type Dictionary<
|
16
|
+
type Dictionary<TEndType, TType> = {
|
17
|
+
readonly 'dictionary': g_common.T.Dictionary<TType>;
|
18
|
+
readonly 'end': TEndType;
|
19
|
+
};
|
11
20
|
namespace DictionaryBuildStrategy {
|
12
21
|
namespace ignore { }
|
13
|
-
type ignore
|
22
|
+
type ignore = null;
|
14
23
|
namespace overwrite { }
|
15
|
-
type overwrite
|
24
|
+
type overwrite = null;
|
16
25
|
}
|
17
|
-
type DictionaryBuildStrategy
|
26
|
+
type DictionaryBuildStrategy = ['ignore', null] | ['overwrite', null];
|
18
27
|
namespace KeyValuePair {
|
19
|
-
type key<
|
20
|
-
type value<
|
28
|
+
type key<TType> = string;
|
29
|
+
type value<TType> = TType;
|
21
30
|
}
|
22
|
-
type KeyValuePair<
|
31
|
+
type KeyValuePair<TType> = {
|
23
32
|
readonly 'key': string;
|
24
|
-
readonly 'value':
|
33
|
+
readonly 'value': TType;
|
25
34
|
};
|
26
|
-
type Type<GType> = GType;
|
27
35
|
}
|
@@ -2,20 +2,16 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.$r = void 0;
|
4
4
|
const buildArray_native_1 = require("./implementations/buildArray.native");
|
5
|
-
const
|
6
|
-
const
|
7
|
-
const
|
8
|
-
const
|
9
|
-
const
|
10
|
-
const createUnsafeAsyncDictionaryBuilder_native_1 = require("./implementations/createUnsafeAsyncDictionaryBuilder.native");
|
11
|
-
const unsafeSyncBuildDictionary_native_1 = require("./implementations/unsafeSyncBuildDictionary.native");
|
5
|
+
const buildSafeDictionary_native_1 = require("./implementations/buildSafeDictionary.native");
|
6
|
+
const buildUnsafeDictionary_native_1 = require("./implementations/buildUnsafeDictionary.native");
|
7
|
+
const createArrayBuilder_native_1 = require("./implementations/createArrayBuilder.native");
|
8
|
+
const createSafeDictionaryBuilder_native_1 = require("./implementations/createSafeDictionaryBuilder.native");
|
9
|
+
const createUnsafeDictionaryBuilder_native_1 = require("./implementations/createUnsafeDictionaryBuilder.native");
|
12
10
|
exports.$r = {
|
13
11
|
'buildArray': buildArray_native_1.$$,
|
14
|
-
'
|
15
|
-
'
|
16
|
-
'
|
17
|
-
'
|
18
|
-
'
|
19
|
-
'createUnsafeAsyncDictionaryBuilder': createUnsafeAsyncDictionaryBuilder_native_1.$$,
|
20
|
-
'unsafeSyncBuildDictionary': unsafeSyncBuildDictionary_native_1.$$,
|
12
|
+
'buildSafeDictionary': buildSafeDictionary_native_1.$$,
|
13
|
+
'buildUnsafeDictionary': buildUnsafeDictionary_native_1.$$,
|
14
|
+
'createArrayBuilder': createArrayBuilder_native_1.$$,
|
15
|
+
'createSafeDictionaryBuilder': createSafeDictionaryBuilder_native_1.$$,
|
16
|
+
'createUnsafeDictionaryBuilder': createUnsafeDictionaryBuilder_native_1.$$,
|
21
17
|
};
|
@@ -25,11 +25,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
26
|
exports.$$ = void 0;
|
27
27
|
const pi = __importStar(require("pareto-core-internals"));
|
28
|
-
const $$ = (
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
28
|
+
const $$ = () => {
|
29
|
+
return ($c) => {
|
30
|
+
const out = [];
|
31
|
+
$c(($) => {
|
32
|
+
out.push($);
|
33
|
+
});
|
34
|
+
return pi.wrapRawArray(out);
|
35
|
+
};
|
34
36
|
};
|
35
37
|
exports.$$ = $$;
|
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
26
|
exports.$$ = void 0;
|
27
27
|
const pi = __importStar(require("pareto-core-internals"));
|
28
|
-
const $$ = ($
|
28
|
+
const $$ = ($x, $se) => {
|
29
29
|
return ($c) => {
|
30
30
|
const out = {};
|
31
31
|
$c(($) => {
|
@@ -33,7 +33,19 @@ const $$ = ($d, $se) => {
|
|
33
33
|
out[$.key] = $.value;
|
34
34
|
}
|
35
35
|
else {
|
36
|
-
|
36
|
+
const x = $;
|
37
|
+
switch ($x[0]) {
|
38
|
+
case 'ignore':
|
39
|
+
pi.cc($x[1], ($) => {
|
40
|
+
});
|
41
|
+
break;
|
42
|
+
case 'overwrite':
|
43
|
+
pi.cc($x[1], ($) => {
|
44
|
+
out[x.key] = x.value;
|
45
|
+
});
|
46
|
+
break;
|
47
|
+
default: pi.au($x[0]);
|
48
|
+
}
|
37
49
|
$se.onDuplicate($.key);
|
38
50
|
}
|
39
51
|
});
|
@@ -25,16 +25,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
26
|
exports.$$ = void 0;
|
27
27
|
const pi = __importStar(require("pareto-core-internals"));
|
28
|
-
const $$ = (
|
28
|
+
const $$ = () => {
|
29
29
|
return ($c) => {
|
30
30
|
const out = {};
|
31
31
|
$c(($) => {
|
32
|
-
if (out[$.key]
|
33
|
-
|
34
|
-
}
|
35
|
-
else {
|
36
|
-
$se.onDuplicate($.key);
|
32
|
+
if (out[$.key] !== undefined) {
|
33
|
+
pi.panic(`entry '${$.key}' already exists`);
|
37
34
|
}
|
35
|
+
out[$.key] = $.value;
|
38
36
|
});
|
39
37
|
return pi.wrapRawDictionary(out);
|
40
38
|
};
|
@@ -25,18 +25,21 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
26
|
exports.$$ = void 0;
|
27
27
|
const pi = __importStar(require("pareto-core-internals"));
|
28
|
-
const $$ = (
|
29
|
-
const dict = {};
|
28
|
+
const $$ = () => {
|
30
29
|
return {
|
31
|
-
'
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
30
|
+
'construct': ($is) => {
|
31
|
+
const arr = [];
|
32
|
+
return {
|
33
|
+
'data': ($) => {
|
34
|
+
arr.push($);
|
35
|
+
},
|
36
|
+
'end': ($) => {
|
37
|
+
$is.handler({
|
38
|
+
'end': $,
|
39
|
+
'array': pi.wrapRawArray(arr)
|
40
|
+
});
|
41
|
+
}
|
42
|
+
};
|
40
43
|
}
|
41
44
|
};
|
42
45
|
};
|
@@ -26,13 +26,40 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.$$ = void 0;
|
27
27
|
const pi = __importStar(require("pareto-core-internals"));
|
28
28
|
const $$ = ($c) => {
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
29
|
+
return {
|
30
|
+
'construct': ($is) => {
|
31
|
+
const dict = {};
|
32
|
+
return {
|
33
|
+
'data': ($) => {
|
34
|
+
if (dict[$.key] !== undefined) {
|
35
|
+
const x = $;
|
36
|
+
switch ($c[0]) {
|
37
|
+
case 'ignore':
|
38
|
+
pi.cc($c[1], ($) => {
|
39
|
+
});
|
40
|
+
break;
|
41
|
+
case 'overwrite':
|
42
|
+
pi.cc($c[1], ($) => {
|
43
|
+
dict[x.key] = x.value;
|
44
|
+
});
|
45
|
+
break;
|
46
|
+
default: pi.au($c[0]);
|
47
|
+
}
|
48
|
+
$is.duplicatesHandler.data($.key);
|
49
|
+
}
|
50
|
+
else {
|
51
|
+
dict[$.key] = $.value;
|
52
|
+
}
|
53
|
+
},
|
54
|
+
'end': ($) => {
|
55
|
+
$is.handler({
|
56
|
+
'dictionary': pi.wrapRawDictionary(dict),
|
57
|
+
'end': $,
|
58
|
+
});
|
59
|
+
$is.duplicatesHandler.end();
|
60
|
+
}
|
61
|
+
};
|
33
62
|
}
|
34
|
-
|
35
|
-
});
|
36
|
-
return pi.wrapRawDictionary(out);
|
63
|
+
};
|
37
64
|
};
|
38
65
|
exports.$$ = $$;
|
@@ -25,14 +25,24 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
26
|
exports.$$ = void 0;
|
27
27
|
const pi = __importStar(require("pareto-core-internals"));
|
28
|
-
const $$ = (
|
29
|
-
const arr = [];
|
28
|
+
const $$ = () => {
|
30
29
|
return {
|
31
|
-
'
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
30
|
+
'construct': ($is) => {
|
31
|
+
const dict = {};
|
32
|
+
return {
|
33
|
+
'data': ($) => {
|
34
|
+
if (dict[$.key] !== undefined) {
|
35
|
+
pi.panic(`duplicate key: ${$.key}`);
|
36
|
+
}
|
37
|
+
dict[$.key] = $.value;
|
38
|
+
},
|
39
|
+
'end': ($) => {
|
40
|
+
$is.handler({
|
41
|
+
'dictionary': pi.wrapRawDictionary(dict),
|
42
|
+
'end': $
|
43
|
+
});
|
44
|
+
}
|
45
|
+
};
|
36
46
|
}
|
37
47
|
};
|
38
48
|
};
|
package/package.json
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
"license": "TBD",
|
4
4
|
"description": "this library provides functions to build arrays and dictionaries by adding entries/elements one by one",
|
5
5
|
"dependencies": {
|
6
|
-
"glo-pareto-common": "^0.
|
7
|
-
"pareto-core-internals": "^0.13.
|
6
|
+
"glo-pareto-common": "^0.28.0",
|
7
|
+
"pareto-core-internals": "^0.13.4"
|
8
8
|
},
|
9
9
|
"files": [
|
10
10
|
"dist"
|
@@ -16,6 +16,6 @@
|
|
16
16
|
"main": "dist/index.js",
|
17
17
|
"types": "dist/index.d.ts",
|
18
18
|
"name": "res-pareto-build",
|
19
|
-
"version": "0.
|
20
|
-
"content-fingerprint": "
|
19
|
+
"version": "0.11.0",
|
20
|
+
"content-fingerprint": "12ff37e1a36c0f336eedf4891c3d4e189f76cca7"
|
21
21
|
}
|
@@ -1,45 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
-
if (mod && mod.__esModule) return mod;
|
20
|
-
var result = {};
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
-
__setModuleDefault(result, mod);
|
23
|
-
return result;
|
24
|
-
};
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
-
exports.$$ = void 0;
|
27
|
-
const pi = __importStar(require("pareto-core-internals"));
|
28
|
-
const $$ = ($is) => {
|
29
|
-
const dict = {};
|
30
|
-
return {
|
31
|
-
'data': ($) => {
|
32
|
-
if (dict[$.key] !== undefined) {
|
33
|
-
$is.duplicatesHandler.data($.key);
|
34
|
-
}
|
35
|
-
else {
|
36
|
-
dict[$.key] = $.value;
|
37
|
-
}
|
38
|
-
},
|
39
|
-
'end': () => {
|
40
|
-
$is.handler(pi.wrapRawDictionary(dict));
|
41
|
-
$is.duplicatesHandler.end();
|
42
|
-
}
|
43
|
-
};
|
44
|
-
};
|
45
|
-
exports.$$ = $$;
|
@@ -1,42 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
-
if (mod && mod.__esModule) return mod;
|
20
|
-
var result = {};
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
-
__setModuleDefault(result, mod);
|
23
|
-
return result;
|
24
|
-
};
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
-
exports.$$ = void 0;
|
27
|
-
const pi = __importStar(require("pareto-core-internals"));
|
28
|
-
const $$ = ($is) => {
|
29
|
-
const dict = {};
|
30
|
-
return {
|
31
|
-
'data': ($) => {
|
32
|
-
if (dict[$.key] !== undefined) {
|
33
|
-
pi.panic(`duplicate key: ${$.key}`);
|
34
|
-
}
|
35
|
-
dict[$.key] = $.value;
|
36
|
-
},
|
37
|
-
'end': () => {
|
38
|
-
$is.handler(pi.wrapRawDictionary(dict));
|
39
|
-
}
|
40
|
-
};
|
41
|
-
};
|
42
|
-
exports.$$ = $$;
|