exupery-core-data 0.1.1 → 0.1.3

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.
@@ -0,0 +1,14 @@
1
+ import * as _et from 'exupery-core-types';
2
+ import * as pt from 'exupery-core-types';
3
+ export type Raw_Or_Normal_Dictionary<T> = {
4
+ [key: string]: T;
5
+ } | pt.Dictionary<T>;
6
+ export type Raw_Dictionary<T> = {
7
+ [key: string]: T;
8
+ };
9
+ export declare const to_raw_array: <T>($: pt.Array<T>) => readonly T[];
10
+ export type Dictionary<T_D> = _et.Dictionary<T_D>;
11
+ export type List<T_L> = _et.Array<T_L>;
12
+ export declare const wrap_dictionary: <T>($: Raw_Or_Normal_Dictionary<T>) => Dictionary<T>;
13
+ export declare const wrap_list: <T>($: T[]) => List<T>;
14
+ export declare const wrap_state_group: <T>($: T) => T;
@@ -0,0 +1,49 @@
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.wrap_state_group = exports.wrap_list = exports.wrap_dictionary = exports.to_raw_array = void 0;
27
+ const _ei = __importStar(require("exupery-core-internals"));
28
+ const to_raw_array = ($) => $.__get_raw_copy();
29
+ exports.to_raw_array = to_raw_array;
30
+ const wrap_dictionary = ($) => {
31
+ function is_normal($) {
32
+ return $.to_array !== undefined && typeof $.to_array === "function";
33
+ }
34
+ if (is_normal($)) {
35
+ return $;
36
+ }
37
+ else {
38
+ return _ei.dictionary_literal($);
39
+ }
40
+ };
41
+ exports.wrap_dictionary = wrap_dictionary;
42
+ const wrap_list = ($) => {
43
+ return _ei.array_literal($);
44
+ };
45
+ exports.wrap_list = wrap_list;
46
+ const wrap_state_group = ($) => {
47
+ return $;
48
+ };
49
+ exports.wrap_state_group = wrap_state_group;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exupery-core-data",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "license": "ISC",
5
5
  "description": "the Exupery package used for building datasets",
6
6
  "author": "Corno",