@scx-js/scx-data 0.1.7 → 0.1.8

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,10 +1,10 @@
1
1
  class FieldPolicy {
2
2
 
3
- included(...fieldNames) {
3
+ include(...fieldNames) {
4
4
  return this;
5
5
  }
6
6
 
7
- excluded(...fieldNames) {
7
+ exclude(...fieldNames) {
8
8
  return this;
9
9
  }
10
10
 
@@ -1,11 +1,11 @@
1
1
  import {FieldPolicyImpl} from "./FieldPolicyImpl.js";
2
2
  import {EXCLUDED, INCLUDED} from "./FilterMode.js";
3
3
 
4
- function includedAll() {
4
+ function includeAll() {
5
5
  return new FieldPolicyImpl(EXCLUDED);
6
6
  }
7
7
 
8
- function excludedAll() {
8
+ function excludeAll() {
9
9
  return new FieldPolicyImpl(INCLUDED);
10
10
  }
11
11
 
@@ -14,8 +14,8 @@ function excludedAll() {
14
14
  * @param fieldNames
15
15
  * @return {FieldPolicy}
16
16
  */
17
- function included(...fieldNames) {
18
- return excludedAll().included(...fieldNames);
17
+ function include(...fieldNames) {
18
+ return excludeAll().include(...fieldNames);
19
19
  }
20
20
 
21
21
  /**
@@ -23,27 +23,27 @@ function included(...fieldNames) {
23
23
  * @param fieldNames
24
24
  * @return {FieldPolicy}
25
25
  */
26
- function excluded(...fieldNames) {
27
- return includedAll().excluded(...fieldNames);
26
+ function exclude(...fieldNames) {
27
+ return includeAll().exclude(...fieldNames);
28
28
  }
29
29
 
30
30
  function ignoreNull(ignoreNull) {
31
- return includedAll().ignoreNull(ignoreNull);
31
+ return includeAll().ignoreNull(ignoreNull);
32
32
  }
33
33
 
34
34
  function ignoreNull__(fieldName, ignoreNull) {
35
- return includedAll().ignoreNull__(fieldName, ignoreNull);
35
+ return includeAll().ignoreNull__(fieldName, ignoreNull);
36
36
  }
37
37
 
38
38
  function expression(fieldName, expression) {
39
- return includedAll().expression(fieldName, expression);
39
+ return includeAll().expression(fieldName, expression);
40
40
  }
41
41
 
42
42
  export {
43
- includedAll,
44
- excludedAll,
45
- included,
46
- excluded,
43
+ includeAll,
44
+ excludeAll,
45
+ include,
46
+ exclude,
47
47
  ignoreNull,
48
48
  ignoreNull__,
49
49
  expression,
@@ -18,7 +18,7 @@ class FieldPolicyImpl extends FieldPolicy {
18
18
  this.#ignoreNull = true;
19
19
  }
20
20
 
21
- included(...fieldNames) {
21
+ include(...fieldNames) {
22
22
  if (this.#filterMode === INCLUDED) {
23
23
  this.addFieldNames(...fieldNames);
24
24
  } else if (this.#filterMode === EXCLUDED) {
@@ -27,7 +27,7 @@ class FieldPolicyImpl extends FieldPolicy {
27
27
  return this;
28
28
  }
29
29
 
30
- excluded(...fieldNames) {
30
+ exclude(...fieldNames) {
31
31
  if (this.#filterMode === EXCLUDED) {
32
32
  this.addFieldNames(...fieldNames);
33
33
  } else if (this.#filterMode === INCLUDED) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scx-js/scx-data",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "SCX Data",
5
5
  "license": "MIT",
6
6
  "author": "scx567888",
@@ -11,6 +11,6 @@
11
11
  "url": "https://github.com/scx567888/scx-js.git"
12
12
  },
13
13
  "dependencies": {
14
- "@scx-js/scx-common": "0.1.7"
14
+ "@scx-js/scx-common": "0.1.8"
15
15
  }
16
16
  }