@thi.ng/api 8.12.9 → 8.12.11
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/README.md +1 -1
- package/mixin.js +2 -2
- package/mixins/iwatch.js +1 -1
- package/package.json +2 -2
- package/typedarray.js +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 212 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
package/mixin.js
CHANGED
|
@@ -3,7 +3,7 @@ const mixin = (behaviour, sharedBehaviour = {}) => {
|
|
|
3
3
|
const sharedKeys = Reflect.ownKeys(sharedBehaviour);
|
|
4
4
|
const typeTag = Symbol("isa");
|
|
5
5
|
function _mixin(clazz) {
|
|
6
|
-
for (
|
|
6
|
+
for (const key of instanceKeys) {
|
|
7
7
|
const existing = Object.getOwnPropertyDescriptor(
|
|
8
8
|
clazz.prototype,
|
|
9
9
|
key
|
|
@@ -19,7 +19,7 @@ const mixin = (behaviour, sharedBehaviour = {}) => {
|
|
|
19
19
|
Object.defineProperty(clazz.prototype, typeTag, { value: true });
|
|
20
20
|
return clazz;
|
|
21
21
|
}
|
|
22
|
-
for (
|
|
22
|
+
for (const key of sharedKeys) {
|
|
23
23
|
Object.defineProperty(_mixin, key, {
|
|
24
24
|
value: sharedBehaviour[key],
|
|
25
25
|
enumerable: sharedBehaviour.propertyIsEnumerable(key)
|
package/mixins/iwatch.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/api",
|
|
3
|
-
"version": "8.12.
|
|
3
|
+
"version": "8.12.11",
|
|
4
4
|
"description": "Common, generic types, interfaces & mixins",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -233,5 +233,5 @@
|
|
|
233
233
|
"thi.ng": {
|
|
234
234
|
"tag": "none"
|
|
235
235
|
},
|
|
236
|
-
"gitHead": "
|
|
236
|
+
"gitHead": "e7a21b9d2a188fa04d4c893d8531c40fbc0f4c06\n"
|
|
237
237
|
}
|
package/typedarray.js
CHANGED
|
@@ -104,7 +104,7 @@ function typedArrayOfVec(type, data, stride) {
|
|
|
104
104
|
}
|
|
105
105
|
const typedArrayType = (x) => {
|
|
106
106
|
if (Array.isArray(x)) return "f64";
|
|
107
|
-
for (
|
|
107
|
+
for (const id in TYPEDARRAY_CTORS) {
|
|
108
108
|
if (x instanceof TYPEDARRAY_CTORS[id]) return id;
|
|
109
109
|
}
|
|
110
110
|
return "f64";
|