res-pareto-build 0.5.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (25) hide show
  1. package/dist/api.generated.d.ts +18 -0
  2. package/dist/glossary/algorithmtypes.generated.d.ts +28 -0
  3. package/dist/{definition/glossary/types.generated.d.ts → glossary/datatypes.generated.d.ts} +1 -1
  4. package/dist/glossary/index.d.ts +2 -0
  5. package/dist/{definition/glossary → glossary}/index.js +2 -2
  6. package/dist/implementation.generated.d.ts +1 -1
  7. package/dist/implementation.generated.js +4 -2
  8. package/dist/implementations/buildArray.native.d.ts +2 -2
  9. package/dist/implementations/buildArray.native.js +1 -1
  10. package/dist/implementations/createIgnoringDictionaryBuilder.native.d.ts +2 -0
  11. package/dist/implementations/{buildDictionary.native.js → createIgnoringDictionaryBuilder.native.js} +12 -24
  12. package/dist/implementations/createOverwritingDictionaryBuilder.native.d.ts +2 -0
  13. package/dist/implementations/createOverwritingDictionaryBuilder.native.js +43 -0
  14. package/dist/implementations/unsafeBuildDictionary.native.d.ts +2 -2
  15. package/dist/implementations/unsafeBuildDictionary.native.js +1 -1
  16. package/dist/index.d.ts +2 -2
  17. package/dist/index.js +2 -2
  18. package/package.json +3 -3
  19. package/dist/definition/api.generated.d.ts +0 -9
  20. package/dist/definition/glossary/index.d.ts +0 -2
  21. package/dist/definition/glossary/public.generated.d.ts +0 -13
  22. package/dist/implementations/buildDictionary.native.d.ts +0 -2
  23. /package/dist/{definition/api.generated.js → api.generated.js} +0 -0
  24. /package/dist/{definition/glossary/public.generated.js → glossary/algorithmtypes.generated.js} +0 -0
  25. /package/dist/{definition/glossary/types.generated.js → glossary/datatypes.generated.js} +0 -0
@@ -0,0 +1,18 @@
1
+ import * as g_common from "glo-pareto-common";
2
+ import * as g_this from "./glossary";
3
+ export declare namespace A {
4
+ type buildArray = g_this.SYNC.F.BuildArray;
5
+ type createIgnoringDictionaryBuilder = ($d: {}, $se: {
6
+ readonly 'onDuplicate': g_common.SYNC.I.String;
7
+ }) => g_this.SYNC.F.BuildDictionary;
8
+ type createOverwritingDictionaryBuilder = ($d: {}, $se: {
9
+ readonly 'onDuplicate': g_common.SYNC.I.String;
10
+ }) => g_this.SYNC.F.BuildDictionary;
11
+ type unsafeBuildDictionary = g_this.SYNC.F.UnsafeBuildDictionary;
12
+ }
13
+ export type API = {
14
+ buildArray: A.buildArray;
15
+ createIgnoringDictionaryBuilder: A.createIgnoringDictionaryBuilder;
16
+ createOverwritingDictionaryBuilder: A.createOverwritingDictionaryBuilder;
17
+ unsafeBuildDictionary: A.unsafeBuildDictionary;
18
+ };
@@ -0,0 +1,28 @@
1
+ import { T } from "./datatypes.generated";
2
+ export declare namespace ASYNC {
3
+ namespace I { }
4
+ namespace C { }
5
+ namespace F { }
6
+ }
7
+ export declare namespace SYNC {
8
+ namespace I {
9
+ type Add<GType> = ($: T.KeyValuePair<GType>) => void;
10
+ type Push<GType> = ($: T.Type<GType>) => void;
11
+ }
12
+ namespace I2 {
13
+ type Add<GType> = ($b: I.Add<GType>) => void;
14
+ type Push<GType> = ($b: I.Push<GType>) => void;
15
+ }
16
+ namespace I3 {
17
+ type Add<GType> = ($c: I2.Add<GType>) => void;
18
+ type Push<GType> = ($c: I2.Push<GType>) => void;
19
+ }
20
+ namespace C { }
21
+ namespace C2 { }
22
+ namespace C3 { }
23
+ namespace F {
24
+ type BuildArray = <GType>($c: ($b: I.Push<GType>) => void) => T.Array<GType>;
25
+ type BuildDictionary = <GType>($c: ($b: I.Add<GType>) => void) => T.Dictionary<GType>;
26
+ type UnsafeBuildDictionary = <GType>($c: ($b: I.Add<GType>) => void) => T.Dictionary<GType>;
27
+ }
28
+ }
@@ -1,7 +1,7 @@
1
1
  import * as pt from 'pareto-core-types';
2
2
  export declare namespace T {
3
3
  namespace Array {
4
- type T<GType> = GType;
4
+ type A<GType> = GType;
5
5
  }
6
6
  type Array<GType> = pt.Array<GType>;
7
7
  namespace Dictionary {
@@ -0,0 +1,2 @@
1
+ export * from "./datatypes.generated";
2
+ export * from "./algorithmtypes.generated";
@@ -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("./types.generated"), exports);
18
- __exportStar(require("./public.generated"), exports);
17
+ __exportStar(require("./datatypes.generated"), exports);
18
+ __exportStar(require("./algorithmtypes.generated"), exports);
@@ -1,2 +1,2 @@
1
- import { API } from "./definition/api.generated";
1
+ import { API } from "./api.generated";
2
2
  export declare const $r: API;
@@ -2,10 +2,12 @@
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 buildDictionary_native_1 = require("./implementations/buildDictionary.native");
5
+ const createIgnoringDictionaryBuilder_native_1 = require("./implementations/createIgnoringDictionaryBuilder.native");
6
+ const createOverwritingDictionaryBuilder_native_1 = require("./implementations/createOverwritingDictionaryBuilder.native");
6
7
  const unsafeBuildDictionary_native_1 = require("./implementations/unsafeBuildDictionary.native");
7
8
  exports.$r = {
8
9
  'buildArray': buildArray_native_1.$$,
9
- 'buildDictionary': buildDictionary_native_1.$$,
10
+ 'createIgnoringDictionaryBuilder': createIgnoringDictionaryBuilder_native_1.$$,
11
+ 'createOverwritingDictionaryBuilder': createOverwritingDictionaryBuilder_native_1.$$,
10
12
  'unsafeBuildDictionary': unsafeBuildDictionary_native_1.$$,
11
13
  };
@@ -1,2 +1,2 @@
1
- import { buildArray } from "../definition/api.generated";
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 $$ = ($, $c) => {
28
+ const $$ = ($c) => {
29
29
  const out = [];
30
30
  $c(($) => {
31
31
  out.push($);
@@ -0,0 +1,2 @@
1
+ import { A } from "../api.generated";
2
+ export declare const $$: A.createIgnoringDictionaryBuilder;
@@ -25,30 +25,18 @@ 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 $$ = ($, $c, $i) => {
29
- const dbs = $;
30
- const out = {};
31
- $c(($) => {
32
- if (out[$.key] === undefined) {
33
- out[$.key] = $.value;
34
- }
35
- else {
36
- const kv = $;
37
- switch (dbs[0]) {
38
- case 'ignore':
39
- pi.cc(dbs[1], ($) => {
40
- });
41
- break;
42
- case 'overwrite':
43
- pi.cc(dbs[1], ($) => {
44
- out[kv.key] = kv.value;
45
- });
46
- break;
47
- default: pi.au(dbs[0]);
28
+ const $$ = ($d, $se) => {
29
+ return ($c) => {
30
+ const out = {};
31
+ $c(($) => {
32
+ if (out[$.key] === undefined) {
33
+ out[$.key] = $.value;
48
34
  }
49
- $i($.key);
50
- }
51
- });
52
- return pi.wrapRawDictionary(out);
35
+ else {
36
+ $se.onDuplicate($.key);
37
+ }
38
+ });
39
+ return pi.wrapRawDictionary(out);
40
+ };
53
41
  };
54
42
  exports.$$ = $$;
@@ -0,0 +1,2 @@
1
+ import { A } from "../api.generated";
2
+ export declare const $$: A.createOverwritingDictionaryBuilder;
@@ -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.$$ = $$;
@@ -1,2 +1,2 @@
1
- import { unsafeBuildDictionary } from "../definition/api.generated";
2
- export declare const $$: unsafeBuildDictionary;
1
+ import { A } from "../api.generated";
2
+ export declare const $$: A.unsafeBuildDictionary;
@@ -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 $$ = ($, $c) => {
28
+ const $$ = ($c) => {
29
29
  const out = {};
30
30
  $c(($) => {
31
31
  if (out[$.key] !== undefined) {
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from "./definition/api.generated";
2
- export * from "./definition/glossary";
1
+ export * from "./api.generated";
2
+ export * from "./glossary";
3
3
  export { $r } from "./implementation.generated";
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.$r = void 0;
18
- __exportStar(require("./definition/api.generated"), exports);
19
- __exportStar(require("./definition/glossary"), exports);
18
+ __exportStar(require("./api.generated"), exports);
19
+ __exportStar(require("./glossary"), exports);
20
20
  var implementation_generated_1 = require("./implementation.generated");
21
21
  Object.defineProperty(exports, "$r", { enumerable: true, get: function () { return implementation_generated_1.$r; } });
package/package.json CHANGED
@@ -3,7 +3,7 @@
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.17.0",
6
+ "glo-pareto-common": "^0.22.0",
7
7
  "pareto-core-internals": "^0.13.0"
8
8
  },
9
9
  "files": [
@@ -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.5.0",
20
- "content-fingerprint": "d9cc941bb053ebfd44b77e1f6e0e35f4e50fa94f"
19
+ "version": "0.7.0",
20
+ "content-fingerprint": "048ec3fd2165a655546f1a78df67e6612de2821c"
21
21
  }
@@ -1,9 +0,0 @@
1
- import * as g_this from "./glossary";
2
- export type buildArray = g_this.F.BuildArray;
3
- export type buildDictionary = g_this.F.BuildDictionary;
4
- export type unsafeBuildDictionary = g_this.F.UnsafeBuildDictionary;
5
- export type API = {
6
- buildArray: buildArray;
7
- buildDictionary: buildDictionary;
8
- unsafeBuildDictionary: unsafeBuildDictionary;
9
- };
@@ -1,2 +0,0 @@
1
- export * from "./types.generated";
2
- export * from "./public.generated";
@@ -1,13 +0,0 @@
1
- import { T } from './types.generated';
2
- import * as g_common from "glo-pareto-common";
3
- export declare namespace I { }
4
- export declare namespace B {
5
- type Add<GType> = ($: T.KeyValuePair<GType>) => void;
6
- type OnDuplicate<GType> = ($: g_common.T.String) => void;
7
- type Push<GType> = ($: T.Type<GType>) => void;
8
- }
9
- export declare namespace F {
10
- type BuildArray = <GType>($: g_common.T.Null, $c: ($b: B.Push<GType>) => void) => T.Array<GType>;
11
- type BuildDictionary = <GType>($: T.DictionaryBuildStrategy<GType>, $c: ($b: B.Add<GType>) => void, $b: B.OnDuplicate<GType>) => T.Dictionary<GType>;
12
- type UnsafeBuildDictionary = <GType>($: g_common.T.Null, $c: ($b: B.Add<GType>) => void) => T.Dictionary<GType>;
13
- }
@@ -1,2 +0,0 @@
1
- import { buildDictionary } from "../definition/api.generated";
2
- export declare const $$: buildDictionary;