@aeriajs/common 0.0.99 → 0.0.101

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,2 +1,2 @@
1
1
  import type { Property } from '@aeriajs/types';
2
- export declare const checkForUndefined: (property: Property, propName: string, what: Record<string, unknown>) => boolean;
2
+ export declare const checkForEmptiness: (property: Property, propName: string, what: Record<string, unknown>) => boolean;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.checkForUndefined = void 0;
4
- const checkForUndefined = (property, propName, what) => {
3
+ exports.checkForEmptiness = void 0;
4
+ const checkForEmptiness = (property, propName, what) => {
5
5
  if (property.readOnly || property.isTimestamp) {
6
6
  return false;
7
7
  }
@@ -9,4 +9,4 @@ const checkForUndefined = (property, propName, what) => {
9
9
  || what[propName] === undefined
10
10
  || what[propName] === '';
11
11
  };
12
- exports.checkForUndefined = checkForUndefined;
12
+ exports.checkForEmptiness = checkForEmptiness;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- export const checkForUndefined = (property, propName, what) => {
2
+ export const checkForEmptiness = (property, propName, what) => {
3
3
  if (property.readOnly || property.isTimestamp) {
4
4
  return false;
5
5
  }
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getMissingProperties = void 0;
4
- const checkForUndefined_js_1 = require("./checkForUndefined.js");
4
+ const checkForEmptiness_js_1 = require("./checkForEmptiness.js");
5
5
  const evaluateCondition_js_1 = require("./evaluateCondition.js");
6
6
  const getMissingProperties = (what, schema, required) => {
7
7
  const missingProps = [];
8
8
  if (Array.isArray(required)) {
9
9
  for (const propName of required) {
10
- const isMissing = (0, checkForUndefined_js_1.checkForUndefined)(schema.properties[propName], propName, what);
10
+ const isMissing = (0, checkForEmptiness_js_1.checkForEmptiness)(schema.properties[propName], propName, what);
11
11
  if (isMissing) {
12
12
  missingProps.push(propName);
13
13
  }
@@ -27,7 +27,7 @@ const getMissingProperties = (what, schema, required) => {
27
27
  continue;
28
28
  }
29
29
  }
30
- const isMissing = (0, checkForUndefined_js_1.checkForUndefined)(schema.properties[propName], propName, what);
30
+ const isMissing = (0, checkForEmptiness_js_1.checkForEmptiness)(schema.properties[propName], propName, what);
31
31
  if (isMissing) {
32
32
  missingProps.push(propName);
33
33
  }
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
- import { checkForUndefined } from "./checkForUndefined.mjs";
2
+ import { checkForEmptiness } from "./checkForEmptiness.mjs";
3
3
  import { evaluateCondition } from "./evaluateCondition.mjs";
4
4
  export const getMissingProperties = (what, schema, required) => {
5
5
  const missingProps = [];
6
6
  if (Array.isArray(required)) {
7
7
  for (const propName of required) {
8
- const isMissing = checkForUndefined(
8
+ const isMissing = checkForEmptiness(
9
9
  schema.properties[propName],
10
10
  propName,
11
11
  what
@@ -28,7 +28,7 @@ export const getMissingProperties = (what, schema, required) => {
28
28
  continue;
29
29
  }
30
30
  }
31
- const isMissing = checkForUndefined(
31
+ const isMissing = checkForEmptiness(
32
32
  schema.properties[propName],
33
33
  propName,
34
34
  what
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from './arraysIntersect.js';
2
- export * from './checkForUndefined.js';
2
+ export * from './checkForEmptiness.js';
3
3
  export * from './deepClone.js';
4
4
  export * from './deepMerge.js';
5
5
  export * from './dynamicImport.js';
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./arraysIntersect.js"), exports);
18
- __exportStar(require("./checkForUndefined.js"), exports);
18
+ __exportStar(require("./checkForEmptiness.js"), exports);
19
19
  __exportStar(require("./deepClone.js"), exports);
20
20
  __exportStar(require("./deepMerge.js"), exports);
21
21
  __exportStar(require("./dynamicImport.js"), exports);
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  export * from "./arraysIntersect.mjs";
3
- export * from "./checkForUndefined.mjs";
3
+ export * from "./checkForEmptiness.mjs";
4
4
  export * from "./deepClone.mjs";
5
5
  export * from "./deepMerge.mjs";
6
6
  export * from "./dynamicImport.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/common",
3
- "version": "0.0.99",
3
+ "version": "0.0.101",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -31,7 +31,7 @@
31
31
  "bson": "^6.5.0"
32
32
  },
33
33
  "peerDependencies": {
34
- "@aeriajs/types": "^0.0.85",
34
+ "@aeriajs/types": "^0.0.86",
35
35
  "bson": "^6.5.0"
36
36
  },
37
37
  "scripts": {