not-node 6.2.16 → 6.2.17

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": "not-node",
3
- "version": "6.2.16",
3
+ "version": "6.2.17",
4
4
  "description": "node complimentary part for client side notFramework.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/common.js CHANGED
@@ -1,7 +1,6 @@
1
1
  const fs = require("fs");
2
2
  const path = require("path");
3
3
  const notPath = require("not-path");
4
- const { rejects } = require("assert");
5
4
 
6
5
  /** @module Common */
7
6
  /**
@@ -157,21 +156,21 @@ module.exports.executeFunctionAsAsync = executeFunctionAsAsync;
157
156
  **/
158
157
  module.exports.executeObjectFunction = async (obj, name, params) => {
159
158
  if (obj) {
160
- if (name.indexOf(".") > -1) {
161
- const proc =
162
- typeof obj == "object"
163
- ? notPath.get(":" + name, obj)
164
- : obj[name];
165
- if (proc) {
166
- return await executeFunctionAsAsync(proc.bind(obj), params);
167
- }
168
- } else {
169
- if (obj[name] && isFunc(obj[name])) {
170
- if (isAsync(obj[name])) {
171
- return await obj[name](...params);
172
- } else {
173
- return obj[name](...params);
174
- }
159
+ return;
160
+ }
161
+ if (name.indexOf(".") > -1) {
162
+ const proc =
163
+ typeof obj == "object" ? notPath.get(":" + name, obj) : obj[name];
164
+ if (!proc) {
165
+ return;
166
+ }
167
+ return await executeFunctionAsAsync(proc.bind(obj), params);
168
+ } else {
169
+ if (obj[name] && isFunc(obj[name])) {
170
+ if (isAsync(obj[name])) {
171
+ return await obj[name](...params);
172
+ } else {
173
+ return obj[name](...params);
175
174
  }
176
175
  }
177
176
  }
@@ -9,11 +9,15 @@ module.exports = (form, req) => {
9
9
  `${MODULE_NAME}//${MODEL_NAME}`
10
10
  );
11
11
  if (thisSchema) {
12
- const { skip, size } = notFilter.pager.process(req), //skip,size
12
+ let skip, size;
13
+ const pager = notFilter.pager.process(req), //skip,size
13
14
  sorter = notFilter.sorter.process(req, thisSchema),
14
15
  search = notFilter.search.process(req, thisSchema);
15
16
  let filter = notFilter.filter.process(req, thisSchema);
16
-
17
+ if (pager) {
18
+ skip = pager.skip;
19
+ size = pager.size;
20
+ }
17
21
  return {
18
22
  name: "query",
19
23
  value: { skip, size, sorter, search, filter },