exupery-core-internals 0.1.7 → 0.1.8
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.
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as _et from "exupery-core-types";
|
|
2
2
|
/**
|
|
3
3
|
* returns a Exupery array
|
|
4
|
-
* why is this not the constructor? to call a constructor, you have to use the keyword 'new'. Exupery doesn't use the concept of a class so that keyword should be avoided
|
|
5
4
|
|
|
6
5
|
* @param source An array literal
|
|
7
6
|
* @returns
|
|
@@ -38,15 +38,14 @@ class Array_Class {
|
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* returns a Exupery array
|
|
41
|
-
* why is this not the constructor? to call a constructor, you have to use the keyword 'new'. Exupery doesn't use the concept of a class so that keyword should be avoided
|
|
42
41
|
|
|
43
42
|
* @param source An array literal
|
|
44
43
|
* @returns
|
|
45
44
|
*/
|
|
46
45
|
function array_literal(source) {
|
|
47
|
-
|
|
48
|
-
if (!(data instanceof Array)) {
|
|
46
|
+
if (!(source instanceof Array)) {
|
|
49
47
|
throw new Error("invalid input in 'array_literal'");
|
|
50
48
|
}
|
|
51
|
-
|
|
49
|
+
const data = source.slice(); //create a copy
|
|
50
|
+
return new Array_Class(data);
|
|
52
51
|
}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -24,4 +24,3 @@ __exportStar(require("./imp/public/switch_state"), exports);
|
|
|
24
24
|
__exportStar(require("./imp/public/get_location_info"), exports);
|
|
25
25
|
__exportStar(require("./imp/public/set"), exports);
|
|
26
26
|
__exportStar(require("./imp/public/not_set"), exports);
|
|
27
|
-
__exportStar(require("./imp/public/Error"), exports);
|
package/package.json
CHANGED