@lowdefy/docs 4.0.0-alpha.7 → 4.0.0-alpha.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.
- package/dist/operators/client/filter_default_value.js +55 -0
- package/{public/modules/connectDocsearch.js → dist/operatorsClient.js} +1 -19
- package/{templates/blocks/schemaTransformer.js → dist/types.js} +5 -10
- package/package.json +19 -3
- package/404.yaml +0 -26
- package/CHANGELOG.md +0 -697
- package/actions/CallMethod.yaml +0 -57
- package/actions/JsAction.yaml +0 -281
- package/actions/Link.yaml +0 -120
- package/actions/Login.yaml +0 -123
- package/actions/Logout.yaml +0 -44
- package/actions/Message.yaml +0 -68
- package/actions/Notification.yaml +0 -84
- package/actions/Request.yaml +0 -70
- package/actions/Reset.yaml +0 -42
- package/actions/ResetValidation.yaml +0 -102
- package/actions/ScrollTo.yaml +0 -100
- package/actions/SetGlobal.yaml +0 -78
- package/actions/SetState.yaml +0 -85
- package/actions/Throw.yaml +0 -89
- package/actions/Validate.yaml +0 -104
- package/actions/Wait.yaml +0 -40
- package/blocks/all_icons.yaml +0 -803
- package/blocks/container/Affix.yaml +0 -26
- package/blocks/container/Alert.yaml +0 -27
- package/blocks/container/Badge.yaml +0 -27
- package/blocks/container/Box.yaml +0 -27
- package/blocks/container/Card.yaml +0 -29
- package/blocks/container/Collapse.yaml +0 -38
- package/blocks/container/Comment.yaml +0 -43
- package/blocks/container/ConfirmModal.yaml +0 -36
- package/blocks/container/Descriptions.yaml +0 -51
- package/blocks/container/Drawer.yaml +0 -46
- package/blocks/container/Label.yaml +0 -28
- package/blocks/container/Modal.yaml +0 -46
- package/blocks/container/PageHCF.yaml +0 -28
- package/blocks/container/PageHCSF.yaml +0 -29
- package/blocks/container/PageHSCF.yaml +0 -29
- package/blocks/container/PageHeaderMenu.yaml +0 -52
- package/blocks/container/PageSHCF.yaml +0 -29
- package/blocks/container/PageSiderMenu.yaml +0 -53
- package/blocks/container/Result.yaml +0 -34
- package/blocks/container/Span.yaml +0 -27
- package/blocks/container/Spin.yaml +0 -27
- package/blocks/container/Tabs.yaml +0 -41
- package/blocks/container/Tooltip.yaml +0 -38
- package/blocks/display/Anchor.yaml +0 -25
- package/blocks/display/Avatar.yaml +0 -23
- package/blocks/display/Breadcrumb.yaml +0 -28
- package/blocks/display/Button.yaml +0 -43
- package/blocks/display/DangerousHtml.yaml +0 -62
- package/blocks/display/DangerousMarkdown.yaml +0 -46
- package/blocks/display/Divider.yaml +0 -23
- package/blocks/display/EChart.yaml +0 -53
- package/blocks/display/Html.yaml +0 -50
- package/blocks/display/Icon.yaml +0 -23
- package/blocks/display/Img.yaml +0 -40
- package/blocks/display/Markdown.yaml +0 -31
- package/blocks/display/MarkdownWithCode.yaml +0 -46
- package/blocks/display/Menu.yaml +0 -48
- package/blocks/display/Message.yaml +0 -34
- package/blocks/display/MobileMenu.yaml +0 -47
- package/blocks/display/Notification.yaml +0 -34
- package/blocks/display/Paragraph.yaml +0 -30
- package/blocks/display/Progress.yaml +0 -52
- package/blocks/display/Skeleton.yaml +0 -27
- package/blocks/display/Statistic.yaml +0 -35
- package/blocks/display/Title.yaml +0 -32
- package/blocks/input/AutoComplete.yaml +0 -30
- package/blocks/input/ButtonSelector.yaml +0 -36
- package/blocks/input/CheckboxSelector.yaml +0 -36
- package/blocks/input/CheckboxSwitch.yaml +0 -56
- package/blocks/input/ChromeColorSelector.yaml +0 -24
- package/blocks/input/CircleColorSelector.yaml +0 -24
- package/blocks/input/ColorSelector.yaml +0 -24
- package/blocks/input/CompactColorSelector.yaml +0 -24
- package/blocks/input/DateRangeSelector.yaml +0 -26
- package/blocks/input/DateSelector.yaml +0 -26
- package/blocks/input/DateTimeSelector.yaml +0 -28
- package/blocks/input/GithubColorSelector.yaml +0 -24
- package/blocks/input/MonthSelector.yaml +0 -26
- package/blocks/input/MultipleSelector.yaml +0 -117
- package/blocks/input/NumberInput.yaml +0 -24
- package/blocks/input/Pagination.yaml +0 -33
- package/blocks/input/ParagraphInput.yaml +0 -32
- package/blocks/input/PasswordInput.yaml +0 -48
- package/blocks/input/RadioSelector.yaml +0 -36
- package/blocks/input/RatingSlider.yaml +0 -24
- package/blocks/input/S3UploadButton.yaml +0 -28
- package/blocks/input/Selector.yaml +0 -98
- package/blocks/input/SliderColorSelector.yaml +0 -24
- package/blocks/input/SwatchesColorSelector.yaml +0 -24
- package/blocks/input/Switch.yaml +0 -24
- package/blocks/input/TextArea.yaml +0 -27
- package/blocks/input/TextInput.yaml +0 -59
- package/blocks/input/TitleInput.yaml +0 -32
- package/blocks/input/TwitterColorSelector.yaml +0 -24
- package/blocks/input/WeekSelector.yaml +0 -26
- package/blocks/list/ControlledList.yaml +0 -191
- package/blocks/list/List.yaml +0 -157
- package/blocks/list/TimelineList.yaml +0 -136
- package/body.html +0 -1
- package/concepts/blocks.yaml +0 -249
- package/concepts/cli.yaml +0 -173
- package/concepts/connections-and-requests.yaml +0 -114
- package/concepts/context-and-state.yaml +0 -82
- package/concepts/custom-blocks.yaml +0 -190
- package/concepts/custom-code.yaml +0 -197
- package/concepts/events-and-actions.yaml +0 -224
- package/concepts/hosting-files.yaml +0 -50
- package/concepts/layout.yaml +0 -1464
- package/concepts/lists.yaml +0 -162
- package/concepts/lowdefy-schema.yaml +0 -245
- package/concepts/operators.yaml +0 -66
- package/concepts/overview.yaml +0 -48
- package/concepts/secrets.yaml +0 -56
- package/connections/AWSS3.yaml +0 -228
- package/connections/AmazonRedshift.yaml +0 -75
- package/connections/AxiosHttp.yaml +0 -194
- package/connections/Elasticsearch.yaml +0 -378
- package/connections/GoogleSheet.yaml +0 -332
- package/connections/Knex.yaml +0 -181
- package/connections/KnexRequests.md +0 -121
- package/connections/MSSQL.yaml +0 -90
- package/connections/MariaDB.yaml +0 -77
- package/connections/MongoDB.yaml +0 -581
- package/connections/MySQL.yaml +0 -92
- package/connections/OracleDB.yaml +0 -73
- package/connections/PostgreSQL.yaml +0 -99
- package/connections/Redis.yaml +0 -147
- package/connections/SQLite.yaml +0 -94
- package/connections/SendGridMail.yaml +0 -113
- package/connections/Stripe.yaml +0 -139
- package/deployment/aws-lambda.yaml +0 -128
- package/deployment/docker.yaml +0 -118
- package/deployment/netlify.yaml +0 -69
- package/deployment/node-server.yaml +0 -111
- package/head.html +0 -7
- package/howto/generate-csv.yaml.njk +0 -252
- package/howto/generate-pdf.yaml.njk +0 -651
- package/howto/generateCsv/lowdefy.yaml +0 -64
- package/howto/generateCsv/public/csvMake.js +0 -27
- package/howto/generatePdf/inv_template.yaml +0 -200
- package/howto/generatePdf/lowdefy.yaml +0 -117
- package/howto/generatePdf/my_header.html +0 -1
- package/howto/generatePdf/public/logo_example.png +0 -0
- package/howto/generatePdf/public/modules/importUmd.js +0 -7
- package/howto/generatePdf/public/modules/pdfMake.js +0 -7
- package/howto/generatePdf/public/modules/vfs_fonts.js +0 -12
- package/howto/use-refrences.md +0 -5
- package/introduction.yaml +0 -100
- package/lowdefy.yaml +0 -66
- package/menus.yaml +0 -832
- package/operators/_actions.yaml +0 -123
- package/operators/_and.yaml +0 -90
- package/operators/_args.yaml +0 -79
- package/operators/_array.yaml +0 -326
- package/operators/_base64.yaml +0 -56
- package/operators/_change_case.yaml +0 -347
- package/operators/_date.yaml +0 -71
- package/operators/_diff.yaml +0 -75
- package/operators/_divide.yaml +0 -46
- package/operators/_eq.yaml +0 -67
- package/operators/_event.yaml +0 -103
- package/operators/_format.yaml +0 -209
- package/operators/_function.yaml +0 -66
- package/operators/_get.yaml +0 -108
- package/operators/_global.yaml +0 -107
- package/operators/_gt.yaml +0 -65
- package/operators/_gte.yaml +0 -65
- package/operators/_hash.yaml +0 -109
- package/operators/_if.yaml +0 -44
- package/operators/_if_none.yaml +0 -61
- package/operators/_index.yaml +0 -65
- package/operators/_input.yaml +0 -114
- package/operators/_js.yaml +0 -189
- package/operators/_json.yaml +0 -128
- package/operators/_list_contexts.yaml +0 -37
- package/operators/_location.yaml +0 -59
- package/operators/_log.yaml +0 -36
- package/operators/_lt.yaml +0 -65
- package/operators/_lte.yaml +0 -65
- package/operators/_math.yaml +0 -374
- package/operators/_media.yaml +0 -86
- package/operators/_menu.yaml +0 -81
- package/operators/_mql.yaml +0 -101
- package/operators/_ne.yaml +0 -77
- package/operators/_not.yaml +0 -47
- package/operators/_number.yaml +0 -157
- package/operators/_nunjucks.yaml +0 -73
- package/operators/_object.yaml +0 -193
- package/operators/_operator.yaml +0 -47
- package/operators/_or.yaml +0 -81
- package/operators/_product.yaml +0 -59
- package/operators/_random.yaml +0 -104
- package/operators/_ref.yaml +0 -266
- package/operators/_regex.yaml +0 -83
- package/operators/_request.yaml +0 -50
- package/operators/_secret.yaml +0 -74
- package/operators/_state.yaml +0 -114
- package/operators/_string.yaml +0 -283
- package/operators/_subtract.yaml +0 -38
- package/operators/_sum.yaml +0 -59
- package/operators/_switch.yaml +0 -51
- package/operators/_type.yaml +0 -92
- package/operators/_uri.yaml +0 -56
- package/operators/_url_query.yaml +0 -120
- package/operators/_user.yaml +0 -107
- package/operators/_uuid.yaml +0 -114
- package/operators/_var.yaml +0 -105
- package/operators/_yaml.yaml +0 -107
- package/pages.yaml +0 -227
- package/public/images/authors/gervwyk.jpeg +0 -0
- package/public/images/authors/sandile.jpeg +0 -0
- package/public/images/howto/header_generate_csv.jpg +0 -0
- package/public/images/howto/header_generate_pdf.jpg +0 -0
- package/public/logo_example.png +0 -0
- package/public/lowdefy_app_schema.png +0 -0
- package/public/modules/csvMake.js +0 -27
- package/public/modules/filterDefaultValue.js +0 -48
- package/public/modules/importUmd.js +0 -7
- package/public/modules/index.js +0 -5
- package/public/modules/pdfMake.js +0 -7
- package/public/modules/test/filterDefaultValue.test.js +0 -91
- package/public/modules/vfs_fonts.js +0 -12
- package/public/sitemap.xml +0 -1024
- package/templates/actions.yaml.njk +0 -68
- package/templates/blocks/defaultValueTransformer.js +0 -53
- package/templates/blocks/exampleTransformer.js +0 -81
- package/templates/blocks/layout.yaml +0 -114
- package/templates/blocks/propertiesFormTransformer.js +0 -419
- package/templates/blocks/propertiesGetterTransformer.js +0 -132
- package/templates/blocks/schema.yaml.njk +0 -42
- package/templates/blocks/style.yaml +0 -26
- package/templates/blocks/template.yaml.njk +0 -495
- package/templates/blog.yaml.njk +0 -221
- package/templates/cli_command.yaml.njk +0 -37
- package/templates/footer.yaml.njk +0 -604
- package/templates/general.yaml.njk +0 -124
- package/templates/generateSitemap.js +0 -41
- package/templates/header.yaml +0 -138
- package/templates/navigation_buttons.yaml +0 -68
- package/templates/operators.yaml.njk +0 -82
- package/templates/operatorsMethodTransformer.js +0 -119
- package/templates/test/array.test.js +0 -1335
- package/templates/test/boolean.test.js +0 -98
- package/templates/test/button.test.js +0 -166
- package/templates/test/color.test.js +0 -126
- package/templates/test/enum.test.js +0 -105
- package/templates/test/icon.test.js +0 -109
- package/templates/test/integer.test.js +0 -99
- package/templates/test/manual.test.js +0 -238
- package/templates/test/number.test.js +0 -99
- package/templates/test/object.test.js +0 -434
- package/templates/test/oneOf.test.js +0 -794
- package/templates/test/string.test.js +0 -98
- package/templates/test/yaml.test.js +0 -605
- package/tutorial/next-steps.yaml +0 -83
- package/tutorial/tutorial-actions-operators-config.yaml +0 -142
- package/tutorial/tutorial-actions-operators.yaml +0 -436
- package/tutorial/tutorial-add-blocks-config.yaml +0 -109
- package/tutorial/tutorial-add-blocks.yaml +0 -195
- package/tutorial/tutorial-create-page-config.yaml +0 -77
- package/tutorial/tutorial-create-page.yaml +0 -196
- package/tutorial/tutorial-deploy.yaml +0 -146
- package/tutorial/tutorial-requests-config.yaml +0 -186
- package/tutorial/tutorial-requests.yaml +0 -338
- package/tutorial/tutorial-start.yaml +0 -282
- package/users/login-and-logout.yaml +0 -164
- package/users/openid-connect.yaml +0 -84
- package/users/protected-pages.yaml +0 -67
- package/users/roles.yaml +0 -70
- package/users/user-object.yaml +0 -73
- package/users/users-introduction.yaml +0 -80
- package/version.yaml +0 -1
|
@@ -1,347 +0,0 @@
|
|
|
1
|
-
# Copyright 2020-2021 Lowdefy, Inc
|
|
2
|
-
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
|
-
_ref:
|
|
16
|
-
path: templates/operators.yaml.njk
|
|
17
|
-
transformer: templates/operatorsMethodTransformer.js
|
|
18
|
-
vars:
|
|
19
|
-
pageId: _change_case
|
|
20
|
-
pageTitle: _change_case
|
|
21
|
-
filePath: operators/_change_case.yaml
|
|
22
|
-
description: |
|
|
23
|
-
The `_change_case` operator uses the [`change-case`](https://www.npmjs.com/package/change-case) package to transform an input between camelCase, PascalCase, Capital Case, snake_case, param-case, CONSTANT_CASE and others.
|
|
24
|
-
arguments: |
|
|
25
|
-
The `_change_case` operator takes `on` and `options` as arguments.
|
|
26
|
-
The `on` argument is the input to be transformed and can be a `string`, `array` or `object`.
|
|
27
|
-
The `options` argument is an object with the following properties:
|
|
28
|
-
- `splitRegexp`: The regular expression used to split `on` into word segments. Can be a `string` or an `object` with `pattern` and `flags`.
|
|
29
|
-
- `stripRegexp`: The regular expression used to remove extraneous characters (default: `/[^A-Z0-9]/gi`). Can be a `string` or an `object` with `pattern` and `flags`.
|
|
30
|
-
- `delimiter`: Value used between words (e.g. " ").
|
|
31
|
-
- `convertValues`: Only used when `on` is an object. Toggles whether the object values are converted to the new case (`true`) or left as-is (`false`). Default `true`.
|
|
32
|
-
- `convertKeys`: Only used when `on` is an object. Toggles whether the object keys are converted to the new case (`true`) or left as-is (`false`). Default `false`.
|
|
33
|
-
|
|
34
|
-
The `on` argument behaves as follows:
|
|
35
|
-
###### string
|
|
36
|
-
Transforms the case of the string.
|
|
37
|
-
|
|
38
|
-
###### array
|
|
39
|
-
Transform the case of each string in the array.
|
|
40
|
-
|
|
41
|
-
###### object
|
|
42
|
-
Transforms the case of the values (when `options.convertValues: true`) and keys (when `options.convertKeys: true`) of the object.
|
|
43
|
-
|
|
44
|
-
> Note that the `key` and `value` pairs must be strings.
|
|
45
|
-
examples: |
|
|
46
|
-
###### String with no options:
|
|
47
|
-
```yaml
|
|
48
|
-
_change_case.capitalCase:
|
|
49
|
-
on: 'foo bar'
|
|
50
|
-
```
|
|
51
|
-
Returns: `"Foo Bar"`
|
|
52
|
-
|
|
53
|
-
###### Array with no options:
|
|
54
|
-
```yaml
|
|
55
|
-
_change_case.capitalCase:
|
|
56
|
-
on:
|
|
57
|
-
- 'foo'
|
|
58
|
-
- 'bar'
|
|
59
|
-
```
|
|
60
|
-
Returns: `["Foo", "Bar"]`
|
|
61
|
-
|
|
62
|
-
###### Object with no options:
|
|
63
|
-
```yaml
|
|
64
|
-
_change_case.capitalCase:
|
|
65
|
-
on:
|
|
66
|
-
foo: 'bar'
|
|
67
|
-
```
|
|
68
|
-
Returns: `{ "foo": "Bar" }`
|
|
69
|
-
|
|
70
|
-
###### Object with options.convertKeys: true:
|
|
71
|
-
```yaml
|
|
72
|
-
_change_case.capitalCase:
|
|
73
|
-
on:
|
|
74
|
-
foo: 'bar'
|
|
75
|
-
options:
|
|
76
|
-
convertKeys: true
|
|
77
|
-
```
|
|
78
|
-
Returns: `{ "Foo": "Bar" }`
|
|
79
|
-
|
|
80
|
-
###### Object with options.convertValues: false:
|
|
81
|
-
```yaml
|
|
82
|
-
_change_case.capitalCase:
|
|
83
|
-
on:
|
|
84
|
-
foo: 'bar'
|
|
85
|
-
options:
|
|
86
|
-
convertValues: false
|
|
87
|
-
```
|
|
88
|
-
Returns: `{ "foo": "bar" }`
|
|
89
|
-
|
|
90
|
-
###### String with options.splitRegexp string:
|
|
91
|
-
```yaml
|
|
92
|
-
_change_case.sentenceCase:
|
|
93
|
-
on: 'foo8ar'
|
|
94
|
-
options:
|
|
95
|
-
splitRegexp: '([a-z])([A-Z0-9])'
|
|
96
|
-
```
|
|
97
|
-
Returns: `"Foo 8ar"`
|
|
98
|
-
|
|
99
|
-
###### String with options.stripRegexp string:
|
|
100
|
-
```yaml
|
|
101
|
-
_change_case.sentenceCase:
|
|
102
|
-
on: 'FOO8AR'
|
|
103
|
-
options:
|
|
104
|
-
stripRegexp: '[^A-Z]'
|
|
105
|
-
```
|
|
106
|
-
Returns: `"Foo ar"`
|
|
107
|
-
|
|
108
|
-
###### String with options.splitRegexp object:
|
|
109
|
-
```yaml
|
|
110
|
-
_change_case.sentenceCase:
|
|
111
|
-
on: 'foo8ar'
|
|
112
|
-
options:
|
|
113
|
-
splitRegexp:
|
|
114
|
-
pattern: '([a-z])([A-Z0-9])'
|
|
115
|
-
flags: 'gi'
|
|
116
|
-
```
|
|
117
|
-
Returns: `"F oo 8a r"`
|
|
118
|
-
|
|
119
|
-
###### String with options.stripRegexp object:
|
|
120
|
-
```yaml
|
|
121
|
-
_change_case.sentenceCase:
|
|
122
|
-
on: 'foo8ar'
|
|
123
|
-
options:
|
|
124
|
-
stripRegexp:
|
|
125
|
-
pattern: '[^A-Z]'
|
|
126
|
-
flags: gi
|
|
127
|
-
```
|
|
128
|
-
Returns: `"Foo ar"`
|
|
129
|
-
|
|
130
|
-
methods:
|
|
131
|
-
- name: camelCase
|
|
132
|
-
types: |
|
|
133
|
-
```
|
|
134
|
-
({on: string, options: object}): string
|
|
135
|
-
([on: string, options: object]): string
|
|
136
|
-
({on: object, options: object}): object
|
|
137
|
-
([on: object, options: object]): object
|
|
138
|
-
({on: array, options: object}): array
|
|
139
|
-
([on: array, options: object]): array
|
|
140
|
-
```
|
|
141
|
-
description: |
|
|
142
|
-
The `_change_case.camelCase` method transforms `on` into a string with the separator denoted by the next word capitalized.
|
|
143
|
-
examples: |
|
|
144
|
-
###### Transform snake_case variable to camelCase:
|
|
145
|
-
```yaml
|
|
146
|
-
_change_case.camelCase:
|
|
147
|
-
on: 'my_variable'
|
|
148
|
-
```
|
|
149
|
-
Returns: `"myVariable"`
|
|
150
|
-
- name: capitalCase
|
|
151
|
-
types: |
|
|
152
|
-
```
|
|
153
|
-
({on: string, options: object}): string
|
|
154
|
-
([on: string, options: object]): string
|
|
155
|
-
({on: object, options: object}): object
|
|
156
|
-
([on: object, options: object]): object
|
|
157
|
-
({on: array, options: object}): array
|
|
158
|
-
([on: array, options: object]): array
|
|
159
|
-
```
|
|
160
|
-
description: |
|
|
161
|
-
The `_change_case.capitalCase` method transforms `on` into a space separated string with each word capitalized.
|
|
162
|
-
examples: |
|
|
163
|
-
###### Transform snake_case variable to capitalCase:
|
|
164
|
-
```yaml
|
|
165
|
-
_change_case.capitalCase:
|
|
166
|
-
on: 'my_variable'
|
|
167
|
-
```
|
|
168
|
-
Returns: `"My Variable"`
|
|
169
|
-
- name: constantCase
|
|
170
|
-
types: |
|
|
171
|
-
```
|
|
172
|
-
({on: string, options: object}): string
|
|
173
|
-
([on: string, options: object]): string
|
|
174
|
-
({on: object, options: object}): object
|
|
175
|
-
([on: object, options: object]): object
|
|
176
|
-
({on: array, options: object}): array
|
|
177
|
-
([on: array, options: object]): array
|
|
178
|
-
```
|
|
179
|
-
description: |
|
|
180
|
-
The `_change_case.constantCase` method transforms `on` into upper case string with an underscore between words.
|
|
181
|
-
examples: |
|
|
182
|
-
###### Transform camelCase variable to constantCase:
|
|
183
|
-
```yaml
|
|
184
|
-
_change_case.constantCase:
|
|
185
|
-
on: 'myVariable'
|
|
186
|
-
```
|
|
187
|
-
Returns: `"MY_VARIABLE"`
|
|
188
|
-
|
|
189
|
-
- name: dotCase
|
|
190
|
-
types: |
|
|
191
|
-
```
|
|
192
|
-
({on: string, options: object}): string
|
|
193
|
-
([on: string, options: object]): string
|
|
194
|
-
({on: object, options: object}): object
|
|
195
|
-
([on: object, options: object]): object
|
|
196
|
-
({on: array, options: object}): array
|
|
197
|
-
([on: array, options: object]): array
|
|
198
|
-
```
|
|
199
|
-
description: |
|
|
200
|
-
The `_change_case.dotCase` method transforms `on` into a lower case string with a period between words.
|
|
201
|
-
examples: |
|
|
202
|
-
###### Transform camelCase variable to dotCase:
|
|
203
|
-
```yaml
|
|
204
|
-
_change_case.dotCase:
|
|
205
|
-
on: 'myVariable'
|
|
206
|
-
```
|
|
207
|
-
Returns: `"my.variable"`
|
|
208
|
-
|
|
209
|
-
- name: headerCase
|
|
210
|
-
types: |
|
|
211
|
-
```
|
|
212
|
-
({on: string, options: object}): string
|
|
213
|
-
([on: string, options: object]): string
|
|
214
|
-
({on: object, options: object}): object
|
|
215
|
-
([on: object, options: object]): object
|
|
216
|
-
({on: array, options: object}): array
|
|
217
|
-
([on: array, options: object]): array
|
|
218
|
-
```
|
|
219
|
-
description: |
|
|
220
|
-
The `_change_case.headerCase` method transforms `on` into a dash separated string of capitalized words.
|
|
221
|
-
examples: |
|
|
222
|
-
###### Transform snake_case variable to headerCase:
|
|
223
|
-
```yaml
|
|
224
|
-
_change_case.headerCase:
|
|
225
|
-
on: 'my_variable'
|
|
226
|
-
```
|
|
227
|
-
Returns: `"My-Variable"`
|
|
228
|
-
|
|
229
|
-
- name: noCase
|
|
230
|
-
types: |
|
|
231
|
-
```
|
|
232
|
-
({on: string, options: object}): string
|
|
233
|
-
([on: string, options: object]): string
|
|
234
|
-
({on: object, options: object}): object
|
|
235
|
-
([on: object, options: object]): object
|
|
236
|
-
({on: array, options: object}): array
|
|
237
|
-
([on: array, options: object]): array
|
|
238
|
-
```
|
|
239
|
-
description: |
|
|
240
|
-
The `_change_case.noCase` method transforms `on` into a lower cased string with spaces between words.
|
|
241
|
-
examples: |
|
|
242
|
-
###### Transform camelCase variable to noCase:
|
|
243
|
-
```yaml
|
|
244
|
-
_change_case.noCase:
|
|
245
|
-
on: 'myVariable'
|
|
246
|
-
```
|
|
247
|
-
Returns: `"my variable"`
|
|
248
|
-
|
|
249
|
-
- name: paramCase
|
|
250
|
-
types: |
|
|
251
|
-
```
|
|
252
|
-
({on: string, options: object}): string
|
|
253
|
-
([on: string, options: object]): string
|
|
254
|
-
({on: object, options: object}): object
|
|
255
|
-
([on: object, options: object]): object
|
|
256
|
-
({on: array, options: object}): array
|
|
257
|
-
([on: array, options: object]): array
|
|
258
|
-
```
|
|
259
|
-
description: |
|
|
260
|
-
The `_change_case.paramCase` method transforms `on` into a lower cased string with dashes between words.
|
|
261
|
-
examples: |
|
|
262
|
-
###### Transform snake_case variable to paramCase:
|
|
263
|
-
```yaml
|
|
264
|
-
_change_case.paramCase:
|
|
265
|
-
on: 'my_variable'
|
|
266
|
-
```
|
|
267
|
-
Returns: `"my-variable"`
|
|
268
|
-
|
|
269
|
-
- name: pascalCase
|
|
270
|
-
types: |
|
|
271
|
-
```
|
|
272
|
-
({on: string, options: object}): string
|
|
273
|
-
([on: string, options: object]): string
|
|
274
|
-
({on: object, options: object}): object
|
|
275
|
-
([on: object, options: object]): object
|
|
276
|
-
({on: array, options: object}): array
|
|
277
|
-
([on: array, options: object]): array
|
|
278
|
-
```
|
|
279
|
-
description: |
|
|
280
|
-
The `_change_case.pascalCase` method transforms `on` into a string of capitalized words without separators.
|
|
281
|
-
examples: |
|
|
282
|
-
###### Transform snake_case variable to pascalCase:
|
|
283
|
-
```yaml
|
|
284
|
-
_change_case.pascalCase:
|
|
285
|
-
on: 'my_variable'
|
|
286
|
-
```
|
|
287
|
-
Returns: `"MyVariable"`
|
|
288
|
-
|
|
289
|
-
- name: pathCase
|
|
290
|
-
types: |
|
|
291
|
-
```
|
|
292
|
-
({on: string, options: object}): string
|
|
293
|
-
([on: string, options: object]): string
|
|
294
|
-
({on: object, options: object}): object
|
|
295
|
-
([on: object, options: object]): object
|
|
296
|
-
({on: array, options: object}): array
|
|
297
|
-
([on: array, options: object]): array
|
|
298
|
-
```
|
|
299
|
-
description: |
|
|
300
|
-
The `_change_case.pathCase` method transforms `on` into a lower case string with slashes between words.
|
|
301
|
-
examples: |
|
|
302
|
-
###### Transform snake_case variable to pathCase:
|
|
303
|
-
```yaml
|
|
304
|
-
_change_case.pathCase:
|
|
305
|
-
on: 'my_variable'
|
|
306
|
-
```
|
|
307
|
-
Returns:
|
|
308
|
-
|
|
309
|
-
- name: sentenceCase
|
|
310
|
-
types: |
|
|
311
|
-
```
|
|
312
|
-
({on: string, options: object}): string
|
|
313
|
-
([on: string, options: object]): string
|
|
314
|
-
({on: object, options: object}): object
|
|
315
|
-
([on: object, options: object]): object
|
|
316
|
-
({on: array, options: object}): array
|
|
317
|
-
([on: array, options: object]): array
|
|
318
|
-
```
|
|
319
|
-
description: |
|
|
320
|
-
The `_change_case.sentenceCase` method transforms `on` into a lower case with spaces between words, then capitalize the first word.
|
|
321
|
-
examples: |
|
|
322
|
-
###### Transform snake_case variable to sentenceCase:
|
|
323
|
-
```yaml
|
|
324
|
-
_change_case.sentenceCase:
|
|
325
|
-
on: 'my_variable'
|
|
326
|
-
```
|
|
327
|
-
Returns: `"My variable"`
|
|
328
|
-
|
|
329
|
-
- name: snakeCase
|
|
330
|
-
types: |
|
|
331
|
-
```
|
|
332
|
-
({on: string, options: object}): string
|
|
333
|
-
([on: string, options: object]): string
|
|
334
|
-
({on: object, options: object}): object
|
|
335
|
-
([on: object, options: object]): object
|
|
336
|
-
({on: array, options: object}): array
|
|
337
|
-
([on: array, options: object]): array
|
|
338
|
-
```
|
|
339
|
-
description: |
|
|
340
|
-
The `_change_case.snakeCase` method transforms `on` into a lower case string with underscores between words.
|
|
341
|
-
examples: |
|
|
342
|
-
###### Transform sentence case variable to snakeCase:
|
|
343
|
-
```yaml
|
|
344
|
-
_change_case.snakeCase:
|
|
345
|
-
on: 'My variable'
|
|
346
|
-
```
|
|
347
|
-
Returns: `"my_variable"`
|
package/operators/_date.yaml
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# Copyright 2020-2021 Lowdefy, Inc
|
|
2
|
-
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
|
-
_ref:
|
|
16
|
-
path: templates/operators.yaml.njk
|
|
17
|
-
transformer: templates/operatorsMethodTransformer.js
|
|
18
|
-
vars:
|
|
19
|
-
pageId: _date
|
|
20
|
-
pageTitle: _date
|
|
21
|
-
filePath: operators/_date.yaml
|
|
22
|
-
types: |
|
|
23
|
-
```
|
|
24
|
-
(dateString: string): date
|
|
25
|
-
(unixTimestamp: number): date
|
|
26
|
-
```
|
|
27
|
-
description: |
|
|
28
|
-
The `_date` operator returns a date object representing a single moment in time. It can take a string in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, or a number that is the number of milliseconds since 1 January 1970 UTC (the [UNIX epoch](https://en.wikipedia.org/wiki/Unix_time)).
|
|
29
|
-
arguments: |
|
|
30
|
-
###### string
|
|
31
|
-
An string in ISO 8601 format representing a date and time.
|
|
32
|
-
|
|
33
|
-
###### number
|
|
34
|
-
The number of milliseconds since 1 January 1970 UTC.
|
|
35
|
-
examples: |
|
|
36
|
-
###### Timestamp:
|
|
37
|
-
```yaml
|
|
38
|
-
_date: 1611837509802
|
|
39
|
-
```
|
|
40
|
-
Returns: Thu Jan 28 2021 12:38:29 GMT+0000
|
|
41
|
-
|
|
42
|
-
###### ISO 8601 string, only date:
|
|
43
|
-
```yaml
|
|
44
|
-
_date: 2021-01-28
|
|
45
|
-
```
|
|
46
|
-
Returns: Thu Jan 28 2021 00:00:00 GMT+0000
|
|
47
|
-
|
|
48
|
-
###### ISO 8601 string, date and time:
|
|
49
|
-
```yaml
|
|
50
|
-
_date: 2021-01-28T12:36:03.957Z
|
|
51
|
-
```
|
|
52
|
-
Returns: Thu Jan 28 2021 12:38:29 GMT+0000
|
|
53
|
-
methods:
|
|
54
|
-
- name: now
|
|
55
|
-
types: |
|
|
56
|
-
```
|
|
57
|
-
(void): date
|
|
58
|
-
```
|
|
59
|
-
description: |
|
|
60
|
-
The `_date.now` method returns a date object representing the moment in time it was called. The method can also be used as `_date: now`
|
|
61
|
-
arguments: |
|
|
62
|
-
The `_date.now` method does not take any arguments.
|
|
63
|
-
examples: |
|
|
64
|
-
###### Get the current date and time:
|
|
65
|
-
```yaml
|
|
66
|
-
_date.now: null
|
|
67
|
-
```
|
|
68
|
-
```yaml
|
|
69
|
-
_date: now
|
|
70
|
-
```
|
|
71
|
-
Returns: The current date and time.
|
package/operators/_diff.yaml
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
# Copyright 2020-2021 Lowdefy, Inc
|
|
2
|
-
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
|
-
_ref:
|
|
16
|
-
path: templates/operators.yaml.njk
|
|
17
|
-
transformer: templates/operatorsMethodTransformer.js
|
|
18
|
-
vars:
|
|
19
|
-
pageId: _diff
|
|
20
|
-
pageTitle: _diff
|
|
21
|
-
filePath: operators/_diff.yaml
|
|
22
|
-
methods:
|
|
23
|
-
- name: deep
|
|
24
|
-
types: |
|
|
25
|
-
```
|
|
26
|
-
(arguments: {lhs: any, rhs: any}): object[]
|
|
27
|
-
([lhs: any, rhs: any]): object[]
|
|
28
|
-
```
|
|
29
|
-
description: |
|
|
30
|
-
The `_diff.deep` method compares two objects and returns an object that describes the structural differences between the two objects.
|
|
31
|
-
arguments: |
|
|
32
|
-
###### string
|
|
33
|
-
The string to decode.
|
|
34
|
-
examples: |
|
|
35
|
-
###### Compare two objects using named args:
|
|
36
|
-
```yaml
|
|
37
|
-
_diff.deep:
|
|
38
|
-
lhs:
|
|
39
|
-
deleted: To be deleted
|
|
40
|
-
edited: Edit me
|
|
41
|
-
array: [1]
|
|
42
|
-
rhs:
|
|
43
|
-
new: New value
|
|
44
|
-
edited: Edited
|
|
45
|
-
array: [1, 2]
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
```yaml
|
|
49
|
-
_diff.deep:
|
|
50
|
-
- deleted: To be deleted
|
|
51
|
-
edited: Edit me
|
|
52
|
-
array: [1]
|
|
53
|
-
- new: New value
|
|
54
|
-
edited: Edited
|
|
55
|
-
array: [1, 2]
|
|
56
|
-
```
|
|
57
|
-
Both return:
|
|
58
|
-
```yaml
|
|
59
|
-
- kind: D
|
|
60
|
-
path: [deleted]
|
|
61
|
-
lhs: To be deleted
|
|
62
|
-
- kind: E
|
|
63
|
-
path: [edited]
|
|
64
|
-
lhs: Edit me
|
|
65
|
-
rhs: Edited
|
|
66
|
-
- kind: A
|
|
67
|
-
path: ['array']
|
|
68
|
-
index: 1
|
|
69
|
-
item:
|
|
70
|
-
kind: N
|
|
71
|
-
rhs: 2
|
|
72
|
-
- kind: N
|
|
73
|
-
path: [new]
|
|
74
|
-
rhs: New value
|
|
75
|
-
```
|
package/operators/_divide.yaml
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# Copyright 2020-2021 Lowdefy, Inc
|
|
2
|
-
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
|
-
_ref:
|
|
16
|
-
path: templates/operators.yaml.njk
|
|
17
|
-
transformer: templates/operatorsMethodTransformer.js
|
|
18
|
-
vars:
|
|
19
|
-
pageId: _divide
|
|
20
|
-
pageTitle: _divide
|
|
21
|
-
filePath: operators/_divide.yaml
|
|
22
|
-
types: |
|
|
23
|
-
```
|
|
24
|
-
([numerator: number, denominator: number]): number
|
|
25
|
-
```
|
|
26
|
-
description: |
|
|
27
|
-
The `_divide` operator divides two numbers. It takes an array of two numbers as input and returns the first number divided by the second. Dividing by zero will throw an error.
|
|
28
|
-
arguments: |
|
|
29
|
-
###### array
|
|
30
|
-
An array of two numbers.
|
|
31
|
-
examples: |
|
|
32
|
-
###### Divide two numbers:
|
|
33
|
-
```yaml
|
|
34
|
-
_divide:
|
|
35
|
-
- 12
|
|
36
|
-
- 4
|
|
37
|
-
```
|
|
38
|
-
Returns: `3`
|
|
39
|
-
|
|
40
|
-
###### Cannot divide by zero:
|
|
41
|
-
```yaml
|
|
42
|
-
_divide:
|
|
43
|
-
- 1
|
|
44
|
-
- 0
|
|
45
|
-
```
|
|
46
|
-
Returns: `null` and throws a operator error.
|
package/operators/_eq.yaml
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
# Copyright 2020-2021 Lowdefy, Inc
|
|
2
|
-
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
|
-
_ref:
|
|
16
|
-
path: templates/operators.yaml.njk
|
|
17
|
-
transformer: templates/operatorsMethodTransformer.js
|
|
18
|
-
vars:
|
|
19
|
-
pageId: _eq
|
|
20
|
-
pageTitle: _eq
|
|
21
|
-
filePath: operators/_eq.yaml
|
|
22
|
-
types: |
|
|
23
|
-
```
|
|
24
|
-
([value1: any, value2: any]): boolean
|
|
25
|
-
```
|
|
26
|
-
description: |
|
|
27
|
-
The `_eq` operator tests if two values are equal. It takes an array of two values to test.
|
|
28
|
-
|
|
29
|
-
> The `_eq` operator tests for strict equality, and won't do a deep comparison.
|
|
30
|
-
|
|
31
|
-
arguments: |
|
|
32
|
-
###### array
|
|
33
|
-
An array of two values to compare.
|
|
34
|
-
examples: |
|
|
35
|
-
###### Two strings:
|
|
36
|
-
```yaml
|
|
37
|
-
_eq:
|
|
38
|
-
- "Hello"
|
|
39
|
-
- "Hello"
|
|
40
|
-
```
|
|
41
|
-
Returns: `true`
|
|
42
|
-
|
|
43
|
-
###### Two numbers:
|
|
44
|
-
```yaml
|
|
45
|
-
_eq:
|
|
46
|
-
- _sum:
|
|
47
|
-
- 3
|
|
48
|
-
- 4
|
|
49
|
-
- 8
|
|
50
|
-
```
|
|
51
|
-
Returns: `false`
|
|
52
|
-
|
|
53
|
-
###### Arrays are not compared deeply:
|
|
54
|
-
```yaml
|
|
55
|
-
_eq:
|
|
56
|
-
- [1,2,3]
|
|
57
|
-
- [1,2,3]
|
|
58
|
-
```
|
|
59
|
-
Returns: `false`
|
|
60
|
-
|
|
61
|
-
###### Values from "getter" operators are copies and not equal:
|
|
62
|
-
```yaml
|
|
63
|
-
_eq:
|
|
64
|
-
- _state: my_object
|
|
65
|
-
- _state: my_object
|
|
66
|
-
```
|
|
67
|
-
Returns: `false`
|