@wmfs/asl-choice-processor 1.25.1 → 2.0.0

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.
Files changed (41) hide show
  1. package/.circleci/config.yml +11 -0
  2. package/CHANGELOG.md +38 -0
  3. package/README.md +115 -25
  4. package/lib/Input-value-cache.js +29 -24
  5. package/lib/compile.js +151 -0
  6. package/lib/index.js +24 -32
  7. package/lib/operators/comparisons.js +51 -0
  8. package/lib/operators/extensions.js +12 -0
  9. package/lib/operators/guards.js +24 -0
  10. package/lib/operators/index.js +19 -22
  11. package/lib/operators/type-tests.js +19 -0
  12. package/lib/string-matches.js +26 -0
  13. package/lib/timestamp.js +52 -0
  14. package/package.json +5 -5
  15. package/renovate.json +2 -23
  16. package/test/data-test-expr-tests.js +3 -4
  17. package/test/spec-compliance-tests.js +343 -0
  18. package/lib/execute-operator.js +0 -20
  19. package/lib/find-operator.js +0 -27
  20. package/lib/operators/boolean-equals.js +0 -9
  21. package/lib/operators/includes.js +0 -9
  22. package/lib/operators/is-boolean.js +0 -11
  23. package/lib/operators/is-null.js +0 -13
  24. package/lib/operators/is-present.js +0 -6
  25. package/lib/operators/is-string.js +0 -13
  26. package/lib/operators/is-undefined.js +0 -13
  27. package/lib/operators/numeric-equals.js +0 -9
  28. package/lib/operators/numeric-greater-than-equals.js +0 -9
  29. package/lib/operators/numeric-greater-than.js +0 -9
  30. package/lib/operators/numeric-less-than-equals.js +0 -9
  31. package/lib/operators/numeric-less-than.js +0 -9
  32. package/lib/operators/string-equals.js +0 -9
  33. package/lib/operators/string-greater-than-equals.js +0 -9
  34. package/lib/operators/string-greater-than.js +0 -9
  35. package/lib/operators/string-less-than-equals.js +0 -9
  36. package/lib/operators/string-less-than.js +0 -9
  37. package/lib/operators/timestamp-equals.js +0 -9
  38. package/lib/operators/timestamp-greater-than-equals.js +0 -9
  39. package/lib/operators/timestamp-greater-than.js +0 -9
  40. package/lib/operators/timestamp-less-than-equals.js +0 -9
  41. package/lib/operators/timestamp-less-than.js +0 -9
@@ -1,9 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = function numericGreaterThanEqualsOperator (inputValue, comparisonValue, candidateStateName, cache) {
4
- let nextState
5
- if (inputValue >= comparisonValue) {
6
- nextState = candidateStateName
7
- }
8
- return nextState
9
- }
@@ -1,9 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = function numericGreaterThanOperator (inputValue, comparisonValue, candidateStateName, cache) {
4
- let nextState
5
- if (inputValue > comparisonValue) {
6
- nextState = candidateStateName
7
- }
8
- return nextState
9
- }
@@ -1,9 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = function numericLessThanEqualsOperator (inputValue, comparisonValue, candidateStateName, cache) {
4
- let nextState
5
- if (inputValue <= comparisonValue) {
6
- nextState = candidateStateName
7
- }
8
- return nextState
9
- }
@@ -1,9 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = function numericLessThanOperator (inputValue, comparisonValue, candidateStateName, cache) {
4
- let nextState
5
- if (inputValue < comparisonValue) {
6
- nextState = candidateStateName
7
- }
8
- return nextState
9
- }
@@ -1,9 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = function stringEqualsOperator (inputValue, comparisonValue, candidateStateName, cache) {
4
- let nextState
5
- if (inputValue === comparisonValue) {
6
- nextState = candidateStateName
7
- }
8
- return nextState
9
- }
@@ -1,9 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = function stringGreaterThanEqualsOperator (inputValue, comparisonValue, candidateStateName, cache) {
4
- let nextState
5
- if (inputValue >= comparisonValue) {
6
- nextState = candidateStateName
7
- }
8
- return nextState
9
- }
@@ -1,9 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = function stringGreaterThanOperator (inputValue, comparisonValue, candidateStateName, cache) {
4
- let nextState
5
- if (inputValue > comparisonValue) {
6
- nextState = candidateStateName
7
- }
8
- return nextState
9
- }
@@ -1,9 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = function stringLessThanEqualsOperator (inputValue, comparisonValue, candidateStateName, cache) {
4
- let nextState
5
- if (inputValue <= comparisonValue) {
6
- nextState = candidateStateName
7
- }
8
- return nextState
9
- }
@@ -1,9 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = function stringLessThanOperator (inputValue, comparisonValue, candidateStateName, cache) {
4
- let nextState
5
- if (inputValue < comparisonValue) {
6
- nextState = candidateStateName
7
- }
8
- return nextState
9
- }
@@ -1,9 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = function timestampEqualsOperator (inputValue, comparisonValue, candidateStateName, cache) {
4
- let nextState
5
- if (inputValue === comparisonValue) {
6
- nextState = candidateStateName
7
- }
8
- return nextState
9
- }
@@ -1,9 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = function timestampGreaterThanEqualsOperator (inputValue, comparisonValue, candidateStateName, cache) {
4
- let nextState
5
- if (inputValue >= comparisonValue) {
6
- nextState = candidateStateName
7
- }
8
- return nextState
9
- }
@@ -1,9 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = function timestampGreaterThanOperator (inputValue, comparisonValue, candidateStateName, cache) {
4
- let nextState
5
- if (inputValue > comparisonValue) {
6
- nextState = candidateStateName
7
- }
8
- return nextState
9
- }
@@ -1,9 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = function timestampLessThanEqualsOperator (inputValue, comparisonValue, candidateStateName, cache) {
4
- let nextState
5
- if (inputValue <= comparisonValue) {
6
- nextState = candidateStateName
7
- }
8
- return nextState
9
- }
@@ -1,9 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = function timestampLessThanOperator (inputValue, comparisonValue, candidateStateName, cache) {
4
- let nextState
5
- if (inputValue < comparisonValue) {
6
- nextState = candidateStateName
7
- }
8
- return nextState
9
- }