res-pareto-build 0.6.0 → 0.8.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/api.generated.d.ts +23 -8
- package/dist/glossary/algorithmtypes.generated.d.ts +54 -0
- package/dist/glossary/index.d.ts +2 -2
- package/dist/glossary/index.js +2 -2
- package/dist/implementation.generated.js +14 -4
- package/dist/implementations/buildArray.native.d.ts +2 -2
- package/dist/implementations/buildArray.native.js +1 -1
- package/dist/implementations/createAsyncArrayBuilder.native.d.ts +2 -0
- package/dist/implementations/createAsyncArrayBuilder.native.js +39 -0
- package/dist/implementations/createAsyncIgnoringDictionaryBuilder.native.d.ts +2 -0
- package/dist/implementations/createAsyncIgnoringDictionaryBuilder.native.js +45 -0
- package/dist/implementations/createAsyncOverwritingDictionaryBuilder.native.d.ts +2 -0
- package/dist/implementations/createAsyncOverwritingDictionaryBuilder.native.js +43 -0
- package/dist/implementations/createSyncIgnoringDictionaryBuilder.native.d.ts +2 -0
- package/dist/implementations/{createDictionaryBuilder.native.js → createSyncIgnoringDictionaryBuilder.native.js} +3 -19
- package/dist/implementations/createSyncOverwritingDictionaryBuilder.native.d.ts +2 -0
- package/dist/implementations/createSyncOverwritingDictionaryBuilder.native.js +43 -0
- package/dist/implementations/createUnsafeAsyncDictionaryBuilder.native.d.ts +2 -0
- package/dist/implementations/createUnsafeAsyncDictionaryBuilder.native.js +42 -0
- package/dist/implementations/unsafeSyncBuildDictionary.native.d.ts +2 -0
- package/dist/implementations/{unsafeBuildDictionary.native.js → unsafeSyncBuildDictionary.native.js} +1 -1
- package/package.json +4 -4
- package/dist/glossary/public.generated.d.ts +0 -13
- package/dist/implementations/createDictionaryBuilder.native.d.ts +0 -2
- package/dist/implementations/unsafeBuildDictionary.native.d.ts +0 -2
- /package/dist/glossary/{public.generated.js → algorithmtypes.generated.js} +0 -0
- /package/dist/glossary/{types.generated.d.ts → datatypes.generated.d.ts} +0 -0
- /package/dist/glossary/{types.generated.js → datatypes.generated.js} +0 -0
package/dist/api.generated.d.ts
CHANGED
@@ -1,11 +1,26 @@
|
|
1
|
+
import * as g_common from "glo-pareto-common";
|
1
2
|
import * as g_this from "./glossary";
|
2
|
-
export
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
export declare namespace A {
|
4
|
+
type buildArray = g_this.SYNC.F.BuildArray;
|
5
|
+
type createAsyncArrayBuilder = g_this.ASYNC.C.CreateArrayBuilder;
|
6
|
+
type createAsyncIgnoringDictionaryBuilder = g_this.ASYNC.C.CreateSafeDictionaryBuilder;
|
7
|
+
type createAsyncOverwritingDictionaryBuilder = g_this.ASYNC.C.CreateSafeDictionaryBuilder;
|
8
|
+
type createSyncIgnoringDictionaryBuilder = ($d: {}, $se: {
|
9
|
+
readonly 'onDuplicate': g_common.SYNC.I.String;
|
10
|
+
}) => g_this.SYNC.F.BuildDictionary;
|
11
|
+
type createSyncOverwritingDictionaryBuilder = ($d: {}, $se: {
|
12
|
+
readonly 'onDuplicate': g_common.SYNC.I.String;
|
13
|
+
}) => g_this.SYNC.F.BuildDictionary;
|
14
|
+
type createUnsafeAsyncDictionaryBuilder = g_this.ASYNC.C.CreateUnsafeDictionaryBuilder;
|
15
|
+
type unsafeSyncBuildDictionary = g_this.SYNC.F.BuildDictionary;
|
16
|
+
}
|
7
17
|
export type API = {
|
8
|
-
buildArray: buildArray;
|
9
|
-
|
10
|
-
|
18
|
+
buildArray: A.buildArray;
|
19
|
+
createAsyncArrayBuilder: A.createAsyncArrayBuilder;
|
20
|
+
createAsyncIgnoringDictionaryBuilder: A.createAsyncIgnoringDictionaryBuilder;
|
21
|
+
createAsyncOverwritingDictionaryBuilder: A.createAsyncOverwritingDictionaryBuilder;
|
22
|
+
createSyncIgnoringDictionaryBuilder: A.createSyncIgnoringDictionaryBuilder;
|
23
|
+
createSyncOverwritingDictionaryBuilder: A.createSyncOverwritingDictionaryBuilder;
|
24
|
+
createUnsafeAsyncDictionaryBuilder: A.createUnsafeAsyncDictionaryBuilder;
|
25
|
+
unsafeSyncBuildDictionary: A.unsafeSyncBuildDictionary;
|
11
26
|
};
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import { T } from "./datatypes.generated";
|
2
|
+
import * as g_common from "glo-pareto-common";
|
3
|
+
export declare namespace ASYNC {
|
4
|
+
namespace I {
|
5
|
+
type Array<GType> = ($: T.Array<GType>) => void;
|
6
|
+
type Dictionary<GType> = ($: T.Dictionary<GType>) => void;
|
7
|
+
type DuplicatesHandler<GType> = {
|
8
|
+
'data': ($: g_common.T.String) => void;
|
9
|
+
'end': () => void;
|
10
|
+
};
|
11
|
+
type Elements<GType> = {
|
12
|
+
'data': ($: T.Type<GType>) => void;
|
13
|
+
'end': () => void;
|
14
|
+
};
|
15
|
+
type Entries<GType> = {
|
16
|
+
'data': ($: T.KeyValuePair<GType>) => void;
|
17
|
+
'end': () => void;
|
18
|
+
};
|
19
|
+
}
|
20
|
+
namespace C {
|
21
|
+
type CreateArrayBuilder = <GType>($is: {
|
22
|
+
'handler': I.Array<GType>;
|
23
|
+
}) => I.Elements<GType>;
|
24
|
+
type CreateSafeDictionaryBuilder = <GType>($is: {
|
25
|
+
'duplicatesHandler': I.DuplicatesHandler<GType>;
|
26
|
+
'handler': I.Dictionary<GType>;
|
27
|
+
}) => I.Entries<GType>;
|
28
|
+
type CreateUnsafeDictionaryBuilder = <GType>($is: {
|
29
|
+
'handler': I.Dictionary<GType>;
|
30
|
+
}) => I.Entries<GType>;
|
31
|
+
}
|
32
|
+
namespace F { }
|
33
|
+
}
|
34
|
+
export declare namespace SYNC {
|
35
|
+
namespace I {
|
36
|
+
type Add<GType> = ($: T.KeyValuePair<GType>) => void;
|
37
|
+
type Push<GType> = ($: T.Type<GType>) => void;
|
38
|
+
}
|
39
|
+
namespace I2 {
|
40
|
+
type Add<GType> = ($b: I.Add<GType>) => void;
|
41
|
+
type Push<GType> = ($b: I.Push<GType>) => void;
|
42
|
+
}
|
43
|
+
namespace I3 {
|
44
|
+
type Add<GType> = ($c: I2.Add<GType>) => void;
|
45
|
+
type Push<GType> = ($c: I2.Push<GType>) => void;
|
46
|
+
}
|
47
|
+
namespace C { }
|
48
|
+
namespace C2 { }
|
49
|
+
namespace C3 { }
|
50
|
+
namespace F {
|
51
|
+
type BuildArray = <GType>($c: ($b: I.Push<GType>) => void) => T.Array<GType>;
|
52
|
+
type BuildDictionary = <GType>($c: ($b: I.Add<GType>) => void) => T.Dictionary<GType>;
|
53
|
+
}
|
54
|
+
}
|
package/dist/glossary/index.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from "./
|
2
|
-
export * from "./
|
1
|
+
export * from "./datatypes.generated";
|
2
|
+
export * from "./algorithmtypes.generated";
|
package/dist/glossary/index.js
CHANGED
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./
|
18
|
-
__exportStar(require("./
|
17
|
+
__exportStar(require("./datatypes.generated"), exports);
|
18
|
+
__exportStar(require("./algorithmtypes.generated"), exports);
|
@@ -2,10 +2,20 @@
|
|
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
|
5
|
+
const createAsyncArrayBuilder_native_1 = require("./implementations/createAsyncArrayBuilder.native");
|
6
|
+
const createAsyncIgnoringDictionaryBuilder_native_1 = require("./implementations/createAsyncIgnoringDictionaryBuilder.native");
|
7
|
+
const createAsyncOverwritingDictionaryBuilder_native_1 = require("./implementations/createAsyncOverwritingDictionaryBuilder.native");
|
8
|
+
const createSyncIgnoringDictionaryBuilder_native_1 = require("./implementations/createSyncIgnoringDictionaryBuilder.native");
|
9
|
+
const createSyncOverwritingDictionaryBuilder_native_1 = require("./implementations/createSyncOverwritingDictionaryBuilder.native");
|
10
|
+
const createUnsafeAsyncDictionaryBuilder_native_1 = require("./implementations/createUnsafeAsyncDictionaryBuilder.native");
|
11
|
+
const unsafeSyncBuildDictionary_native_1 = require("./implementations/unsafeSyncBuildDictionary.native");
|
7
12
|
exports.$r = {
|
8
13
|
'buildArray': buildArray_native_1.$$,
|
9
|
-
'
|
10
|
-
'
|
14
|
+
'createAsyncArrayBuilder': createAsyncArrayBuilder_native_1.$$,
|
15
|
+
'createAsyncIgnoringDictionaryBuilder': createAsyncIgnoringDictionaryBuilder_native_1.$$,
|
16
|
+
'createAsyncOverwritingDictionaryBuilder': createAsyncOverwritingDictionaryBuilder_native_1.$$,
|
17
|
+
'createSyncIgnoringDictionaryBuilder': createSyncIgnoringDictionaryBuilder_native_1.$$,
|
18
|
+
'createSyncOverwritingDictionaryBuilder': createSyncOverwritingDictionaryBuilder_native_1.$$,
|
19
|
+
'createUnsafeAsyncDictionaryBuilder': createUnsafeAsyncDictionaryBuilder_native_1.$$,
|
20
|
+
'unsafeSyncBuildDictionary': unsafeSyncBuildDictionary_native_1.$$,
|
11
21
|
};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
2
|
-
export declare const $$: buildArray;
|
1
|
+
import { A } from "../api.generated";
|
2
|
+
export declare const $$: A.buildArray;
|
@@ -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 $$ = ($c) => {
|
29
29
|
const out = [];
|
30
30
|
$c(($) => {
|
31
31
|
out.push($);
|
@@ -0,0 +1,39 @@
|
|
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 arr = [];
|
30
|
+
return {
|
31
|
+
'data': ($) => {
|
32
|
+
arr.push($);
|
33
|
+
},
|
34
|
+
'end': () => {
|
35
|
+
$is.handler(pi.wrapRawArray(arr));
|
36
|
+
}
|
37
|
+
};
|
38
|
+
};
|
39
|
+
exports.$$ = $$;
|
@@ -0,0 +1,45 @@
|
|
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.$$ = $$;
|
@@ -0,0 +1,43 @@
|
|
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
|
+
dict[$.key] = $.value;
|
36
|
+
},
|
37
|
+
'end': () => {
|
38
|
+
$is.handler(pi.wrapRawDictionary(dict));
|
39
|
+
$is.duplicatesHandler.end();
|
40
|
+
}
|
41
|
+
};
|
42
|
+
};
|
43
|
+
exports.$$ = $$;
|
@@ -25,31 +25,15 @@ 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 $$ = ($d) => {
|
29
|
-
return (
|
30
|
-
const dbs = $;
|
28
|
+
const $$ = ($d, $se) => {
|
29
|
+
return ($c) => {
|
31
30
|
const out = {};
|
32
31
|
$c(($) => {
|
33
32
|
if (out[$.key] === undefined) {
|
34
33
|
out[$.key] = $.value;
|
35
34
|
}
|
36
35
|
else {
|
37
|
-
|
38
|
-
switch (dbs[0]) {
|
39
|
-
case 'ignore':
|
40
|
-
pi.cc(dbs[1], ($) => {
|
41
|
-
});
|
42
|
-
break;
|
43
|
-
case 'overwrite':
|
44
|
-
pi.cc(dbs[1], ($) => {
|
45
|
-
out[kv.key] = kv.value;
|
46
|
-
});
|
47
|
-
break;
|
48
|
-
default: pi.au(dbs[0]);
|
49
|
-
}
|
50
|
-
$d.onDuplicate(null, ($i) => {
|
51
|
-
$i($.key);
|
52
|
-
});
|
36
|
+
$se.onDuplicate($.key);
|
53
37
|
}
|
54
38
|
});
|
55
39
|
return pi.wrapRawDictionary(out);
|
@@ -0,0 +1,43 @@
|
|
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 $$ = ($d, $se) => {
|
29
|
+
return ($c) => {
|
30
|
+
const out = {};
|
31
|
+
$c(($) => {
|
32
|
+
if (out[$.key] === undefined) {
|
33
|
+
out[$.key] = $.value;
|
34
|
+
}
|
35
|
+
else {
|
36
|
+
out[$.key] = $.value;
|
37
|
+
$se.onDuplicate($.key);
|
38
|
+
}
|
39
|
+
});
|
40
|
+
return pi.wrapRawDictionary(out);
|
41
|
+
};
|
42
|
+
};
|
43
|
+
exports.$$ = $$;
|
@@ -0,0 +1,42 @@
|
|
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.$$ = $$;
|
package/dist/implementations/{unsafeBuildDictionary.native.js → unsafeSyncBuildDictionary.native.js}
RENAMED
@@ -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 $$ = ($c) => {
|
29
29
|
const out = {};
|
30
30
|
$c(($) => {
|
31
31
|
if (out[$.key] !== undefined) {
|
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.22.0",
|
7
|
+
"pareto-core-internals": "^0.13.2"
|
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.8.0",
|
20
|
+
"content-fingerprint": "ce4db0da70a210f780601c97f8c7c823b7f0c97f"
|
21
21
|
}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import { T } from './types.generated';
|
2
|
-
import * as g_common from "glo-pareto-common";
|
3
|
-
export declare namespace B {
|
4
|
-
type Add<GType> = ($: T.KeyValuePair<GType>) => void;
|
5
|
-
type OnDuplicate<GType> = ($: g_common.T.String) => void;
|
6
|
-
type Push<GType> = ($: T.Type<GType>) => void;
|
7
|
-
}
|
8
|
-
export declare namespace F {
|
9
|
-
type BuildArray = <GType>($: g_common.T.Null, $c: ($b: B.Push<GType>) => void) => T.Array<GType>;
|
10
|
-
type BuildDictionary = <GType>($: T.DictionaryBuildStrategy<GType>, $c: ($b: B.Add<GType>) => void) => T.Dictionary<GType>;
|
11
|
-
type OnDuplicate = <GType>($: g_common.T.Null, $c: ($b: B.OnDuplicate<GType>) => void) => void;
|
12
|
-
type UnsafeBuildDictionary = <GType>($: g_common.T.Null, $c: ($b: B.Add<GType>) => void) => T.Dictionary<GType>;
|
13
|
-
}
|
File without changes
|
File without changes
|
File without changes
|