@colyseus/schema 2.0.18 → 2.0.19
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/build/cjs/index.js +7 -0
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.mjs +7 -0
- package/build/esm/index.mjs.map +1 -1
- package/build/umd/index.js +7 -0
- package/lib/types/ArraySchema.js +7 -0
- package/lib/types/ArraySchema.js.map +1 -1
- package/package.json +1 -1
- package/src/types/ArraySchema.ts +10 -0
package/build/cjs/index.js
CHANGED
|
@@ -395,6 +395,13 @@ function getArrayProxy(value) {
|
|
|
395
395
|
}
|
|
396
396
|
return true;
|
|
397
397
|
},
|
|
398
|
+
has: function (obj, key) {
|
|
399
|
+
if (typeof (key) !== "symbol" &&
|
|
400
|
+
!isNaN(Number(key))) {
|
|
401
|
+
return obj['$items'].has(Number(key));
|
|
402
|
+
}
|
|
403
|
+
return Reflect.has(obj, key);
|
|
404
|
+
}
|
|
398
405
|
});
|
|
399
406
|
return value;
|
|
400
407
|
}
|