@local901/validator 0.2.0 → 0.2.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@local901/validator",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Type validator for javascript and typescript",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -19,7 +19,7 @@ class ObjectValidator extends Validator_1.Validator {
19
19
  // Check for excess keys.
20
20
  const fieldKeys = Object.keys(this.fields);
21
21
  const inputKeys = Object.keys(input);
22
- const extraKeys = inputKeys.filter((k) => !fieldKeys.includes(k));
22
+ const extraKeys = fieldKeys.filter((k) => !inputKeys.includes(k));
23
23
  // Check field types
24
24
  let hasError = false;
25
25
  const fields = Object.fromEntries(Object.entries(this.fields).map(([key, validator]) => {