@lowdefy/operators-js 0.0.0-experimental-20231123101256

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 (61) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +3 -0
  3. package/dist/index.js +17 -0
  4. package/dist/operators/build/env.js +25 -0
  5. package/dist/operators/client/_index.js +25 -0
  6. package/dist/operators/client/actions.js +25 -0
  7. package/dist/operators/client/base64.js +50 -0
  8. package/dist/operators/client/event.js +25 -0
  9. package/dist/operators/client/event_log.js +25 -0
  10. package/dist/operators/client/global.js +25 -0
  11. package/dist/operators/client/input.js +25 -0
  12. package/dist/operators/client/location.js +60 -0
  13. package/dist/operators/client/media.js +62 -0
  14. package/dist/operators/client/menu.js +25 -0
  15. package/dist/operators/client/request.js +34 -0
  16. package/dist/operators/client/request_details.js +25 -0
  17. package/dist/operators/client/state.js +25 -0
  18. package/dist/operators/client/url_query.js +30 -0
  19. package/dist/operators/server/base64.js +52 -0
  20. package/dist/operators/server/hash.js +84 -0
  21. package/dist/operators/server/payload.js +24 -0
  22. package/dist/operators/server/secret.js +32 -0
  23. package/dist/operators/shared/and.js +22 -0
  24. package/dist/operators/shared/args.js +25 -0
  25. package/dist/operators/shared/array.js +263 -0
  26. package/dist/operators/shared/date.js +449 -0
  27. package/dist/operators/shared/divide.js +31 -0
  28. package/dist/operators/shared/eq.js +25 -0
  29. package/dist/operators/shared/function.js +32 -0
  30. package/dist/operators/shared/get.js +36 -0
  31. package/dist/operators/shared/gt.js +25 -0
  32. package/dist/operators/shared/gte.js +25 -0
  33. package/dist/operators/shared/if.js +24 -0
  34. package/dist/operators/shared/if_none.js +28 -0
  35. package/dist/operators/shared/intl.js +94 -0
  36. package/dist/operators/shared/json.js +60 -0
  37. package/dist/operators/shared/log.js +20 -0
  38. package/dist/operators/shared/lt.js +25 -0
  39. package/dist/operators/shared/lte.js +25 -0
  40. package/dist/operators/shared/math.js +271 -0
  41. package/dist/operators/shared/ne.js +25 -0
  42. package/dist/operators/shared/not.js +18 -0
  43. package/dist/operators/shared/number.js +146 -0
  44. package/dist/operators/shared/object.js +129 -0
  45. package/dist/operators/shared/operator.js +38 -0
  46. package/dist/operators/shared/or.js +22 -0
  47. package/dist/operators/shared/product.js +27 -0
  48. package/dist/operators/shared/random.js +97 -0
  49. package/dist/operators/shared/regex.js +42 -0
  50. package/dist/operators/shared/string.js +292 -0
  51. package/dist/operators/shared/subtract.js +28 -0
  52. package/dist/operators/shared/sum.js +27 -0
  53. package/dist/operators/shared/switch.js +30 -0
  54. package/dist/operators/shared/type.js +51 -0
  55. package/dist/operators/shared/uri.js +50 -0
  56. package/dist/operators/shared/user.js +25 -0
  57. package/dist/operatorsBuild.js +88 -0
  58. package/dist/operatorsClient.js +62 -0
  59. package/dist/operatorsServer.js +52 -0
  60. package/dist/types.js +22 -0
  61. package/package.json +64 -0
@@ -0,0 +1,449 @@
1
+ /*
2
+ Copyright 2020-2023 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import { type } from '@lowdefy/helpers';
16
+ import { runClass, runInstance } from '@lowdefy/operators';
17
+ function date(input) {
18
+ const result = new Date(input);
19
+ if (!type.isDate(result)) {
20
+ throw new Error(`${input} could not resolve as a valid javascript date.`);
21
+ }
22
+ return result;
23
+ }
24
+ function now() {
25
+ return new Date();
26
+ }
27
+ const functions = {
28
+ __default: date,
29
+ parse: Date.parse,
30
+ now,
31
+ UTC: Date.UTC
32
+ };
33
+ // TODO: return null instead of current date when null is passed in, consider modifying run instance and run class
34
+ const prep = (args)=>{
35
+ if (type.isNone(args[0])) {
36
+ args[0] = new Date();
37
+ }
38
+ return args;
39
+ };
40
+ const meta = {
41
+ getDate: {
42
+ singleArg: true,
43
+ prep,
44
+ validTypes: [
45
+ 'date',
46
+ 'null'
47
+ ]
48
+ },
49
+ getDay: {
50
+ singleArg: true,
51
+ prep,
52
+ validTypes: [
53
+ 'date',
54
+ 'null'
55
+ ]
56
+ },
57
+ getFullYear: {
58
+ singleArg: true,
59
+ prep,
60
+ validTypes: [
61
+ 'date',
62
+ 'null'
63
+ ]
64
+ },
65
+ getHours: {
66
+ singleArg: true,
67
+ prep,
68
+ validTypes: [
69
+ 'date',
70
+ 'null'
71
+ ]
72
+ },
73
+ getMilliseconds: {
74
+ singleArg: true,
75
+ prep,
76
+ validTypes: [
77
+ 'date',
78
+ 'null'
79
+ ]
80
+ },
81
+ getMinutes: {
82
+ singleArg: true,
83
+ prep,
84
+ validTypes: [
85
+ 'date',
86
+ 'null'
87
+ ]
88
+ },
89
+ getMonth: {
90
+ singleArg: true,
91
+ prep,
92
+ validTypes: [
93
+ 'date',
94
+ 'null'
95
+ ]
96
+ },
97
+ getSeconds: {
98
+ singleArg: true,
99
+ prep,
100
+ validTypes: [
101
+ 'date',
102
+ 'null'
103
+ ]
104
+ },
105
+ getTime: {
106
+ singleArg: true,
107
+ prep,
108
+ validTypes: [
109
+ 'date',
110
+ 'null'
111
+ ]
112
+ },
113
+ getTimezoneOffset: {
114
+ singleArg: true,
115
+ prep,
116
+ validTypes: [
117
+ 'date',
118
+ 'null'
119
+ ]
120
+ },
121
+ getUTCDate: {
122
+ singleArg: true,
123
+ prep,
124
+ validTypes: [
125
+ 'date',
126
+ 'null'
127
+ ]
128
+ },
129
+ getUTCDay: {
130
+ singleArg: true,
131
+ prep,
132
+ validTypes: [
133
+ 'date',
134
+ 'null'
135
+ ]
136
+ },
137
+ getUTCFullYear: {
138
+ singleArg: true,
139
+ prep,
140
+ validTypes: [
141
+ 'date',
142
+ 'null'
143
+ ]
144
+ },
145
+ getUTCHours: {
146
+ singleArg: true,
147
+ prep,
148
+ validTypes: [
149
+ 'date',
150
+ 'null'
151
+ ]
152
+ },
153
+ getUTCMilliseconds: {
154
+ singleArg: true,
155
+ prep,
156
+ validTypes: [
157
+ 'date',
158
+ 'null'
159
+ ]
160
+ },
161
+ getUTCMinutes: {
162
+ singleArg: true,
163
+ prep,
164
+ validTypes: [
165
+ 'date',
166
+ 'null'
167
+ ]
168
+ },
169
+ getUTCMonth: {
170
+ singleArg: true,
171
+ prep,
172
+ validTypes: [
173
+ 'date',
174
+ 'null'
175
+ ]
176
+ },
177
+ getUTCSeconds: {
178
+ singleArg: true,
179
+ prep,
180
+ validTypes: [
181
+ 'date',
182
+ 'null'
183
+ ]
184
+ },
185
+ now: {
186
+ noArgs: true
187
+ },
188
+ parse: {
189
+ singleArg: true,
190
+ prep,
191
+ validTypes: [
192
+ 'string',
193
+ 'null'
194
+ ]
195
+ },
196
+ setDate: {
197
+ namedArgs: [
198
+ 'on',
199
+ 'dayOfMonth'
200
+ ],
201
+ validTypes: [
202
+ 'array',
203
+ 'object'
204
+ ]
205
+ },
206
+ setFullYear: {
207
+ namedArgs: [
208
+ 'on',
209
+ 'year'
210
+ ],
211
+ validTypes: [
212
+ 'array',
213
+ 'object'
214
+ ]
215
+ },
216
+ setHours: {
217
+ namedArgs: [
218
+ 'on',
219
+ 'hours'
220
+ ],
221
+ validTypes: [
222
+ 'array',
223
+ 'object'
224
+ ]
225
+ },
226
+ setMilliseconds: {
227
+ namedArgs: [
228
+ 'on',
229
+ 'milliseconds'
230
+ ],
231
+ validTypes: [
232
+ 'array',
233
+ 'object'
234
+ ]
235
+ },
236
+ setMinutes: {
237
+ namedArgs: [
238
+ 'on',
239
+ 'minutes'
240
+ ],
241
+ validTypes: [
242
+ 'array',
243
+ 'object'
244
+ ]
245
+ },
246
+ setMonth: {
247
+ namedArgs: [
248
+ 'on',
249
+ 'month'
250
+ ],
251
+ validTypes: [
252
+ 'array',
253
+ 'object'
254
+ ]
255
+ },
256
+ setSeconds: {
257
+ namedArgs: [
258
+ 'on',
259
+ 'seconds'
260
+ ],
261
+ validTypes: [
262
+ 'array',
263
+ 'object'
264
+ ]
265
+ },
266
+ setTime: {
267
+ namedArgs: [
268
+ 'on',
269
+ 'time'
270
+ ],
271
+ validTypes: [
272
+ 'array',
273
+ 'object'
274
+ ]
275
+ },
276
+ setUTCDate: {
277
+ namedArgs: [
278
+ 'on',
279
+ 'dayOfMonth'
280
+ ],
281
+ validTypes: [
282
+ 'array',
283
+ 'object'
284
+ ]
285
+ },
286
+ setUTCFullYear: {
287
+ namedArgs: [
288
+ 'on',
289
+ 'year'
290
+ ],
291
+ validTypes: [
292
+ 'array',
293
+ 'object'
294
+ ]
295
+ },
296
+ setUTCHours: {
297
+ namedArgs: [
298
+ 'on',
299
+ 'hours'
300
+ ],
301
+ validTypes: [
302
+ 'array',
303
+ 'object'
304
+ ]
305
+ },
306
+ setUTCMilliseconds: {
307
+ namedArgs: [
308
+ 'on',
309
+ 'milliseconds'
310
+ ],
311
+ validTypes: [
312
+ 'array',
313
+ 'object'
314
+ ]
315
+ },
316
+ setUTCMinutes: {
317
+ namedArgs: [
318
+ 'on',
319
+ 'minutes'
320
+ ],
321
+ validTypes: [
322
+ 'array',
323
+ 'object'
324
+ ]
325
+ },
326
+ setUTCMonth: {
327
+ namedArgs: [
328
+ 'on',
329
+ 'month'
330
+ ],
331
+ validTypes: [
332
+ 'array',
333
+ 'object'
334
+ ]
335
+ },
336
+ setUTCSeconds: {
337
+ namedArgs: [
338
+ 'on',
339
+ 'seconds'
340
+ ],
341
+ validTypes: [
342
+ 'array',
343
+ 'object'
344
+ ]
345
+ },
346
+ toDateString: {
347
+ singleArg: true,
348
+ prep,
349
+ validTypes: [
350
+ 'date',
351
+ 'null'
352
+ ]
353
+ },
354
+ toISOString: {
355
+ singleArg: true,
356
+ prep,
357
+ validTypes: [
358
+ 'date',
359
+ 'null'
360
+ ]
361
+ },
362
+ toJSON: {
363
+ singleArg: true,
364
+ prep,
365
+ validTypes: [
366
+ 'date',
367
+ 'null'
368
+ ]
369
+ },
370
+ toString: {
371
+ singleArg: true,
372
+ prep,
373
+ validTypes: [
374
+ 'date',
375
+ 'null'
376
+ ]
377
+ },
378
+ toTimeString: {
379
+ singleArg: true,
380
+ prep,
381
+ validTypes: [
382
+ 'date',
383
+ 'null'
384
+ ]
385
+ },
386
+ toUTCString: {
387
+ singleArg: true,
388
+ prep,
389
+ validTypes: [
390
+ 'date',
391
+ 'null'
392
+ ]
393
+ },
394
+ UTC: {
395
+ namedArgs: [
396
+ 'year',
397
+ 'month',
398
+ 'day',
399
+ 'hours',
400
+ 'minutes',
401
+ 'seconds'
402
+ ],
403
+ validTypes: [
404
+ 'array',
405
+ 'object'
406
+ ]
407
+ },
408
+ valueOf: {
409
+ singleArg: true,
410
+ prep,
411
+ validTypes: [
412
+ 'date',
413
+ 'null'
414
+ ]
415
+ },
416
+ __default: {
417
+ singleArg: true,
418
+ validTypes: [
419
+ 'number',
420
+ 'string'
421
+ ]
422
+ }
423
+ };
424
+ function _date({ params, location, methodName }) {
425
+ if ([
426
+ 'now',
427
+ 'parse',
428
+ 'UTC'
429
+ ].includes(methodName) || methodName === undefined) {
430
+ return runClass({
431
+ functions,
432
+ location,
433
+ meta,
434
+ methodName,
435
+ operator: '_date',
436
+ params,
437
+ defaultFunction: '__default'
438
+ });
439
+ }
440
+ return runInstance({
441
+ location,
442
+ meta,
443
+ methodName,
444
+ operator: '_date',
445
+ params,
446
+ instanceType: 'date'
447
+ });
448
+ }
449
+ export default _date;
@@ -0,0 +1,31 @@
1
+ /*
2
+ Copyright 2020-2023 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import { type } from '@lowdefy/helpers';
16
+ function _divide({ params, location }) {
17
+ if (!type.isArray(params)) {
18
+ throw new Error(`Operator Error: _divide takes an array type as input. Received: ${JSON.stringify(params)} at ${location}.`);
19
+ }
20
+ if (params.length !== 2) {
21
+ throw new Error(`Operator Error: _divide takes an array of length 2 as input. Received: ${JSON.stringify(params)} at ${location}.`);
22
+ }
23
+ if (!type.isNumber(params[0]) || !type.isNumber(params[1])) {
24
+ throw new Error(`Operator Error: _divide takes an array of 2 numbers. Received: ${JSON.stringify(params)} at ${location}.`);
25
+ }
26
+ if (params[1] === 0) {
27
+ throw new Error(`Operator Error: _divide by zero not allowed. Received: ${JSON.stringify(params)} at ${location}.`);
28
+ }
29
+ return params[0] / params[1];
30
+ }
31
+ export default _divide;
@@ -0,0 +1,25 @@
1
+ /*
2
+ Copyright 2020-2023 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import { type } from '@lowdefy/helpers';
16
+ function _eq({ params, location }) {
17
+ if (!type.isArray(params)) {
18
+ throw new Error(`Operator Error: _eq takes an array type as input. Received: ${JSON.stringify(params)} at ${location}.`);
19
+ }
20
+ if (params.length !== 2) {
21
+ throw new Error(`Operator Error: _eq takes an array of length 2 as input. Received: ${JSON.stringify(params)} at ${location}.`);
22
+ }
23
+ return params[0] === params[1];
24
+ }
25
+ export default _eq;
@@ -0,0 +1,32 @@
1
+ /*
2
+ Copyright 2020-2023 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ function _function({ actions, arrayIndices, event, location, operatorPrefix, params, parser }) {
16
+ return (...args)=>{
17
+ const { output, errors } = parser.parse({
18
+ actions,
19
+ arrayIndices,
20
+ args,
21
+ event,
22
+ input: params,
23
+ location,
24
+ operatorPrefix: `_${operatorPrefix}`
25
+ });
26
+ if (errors.length > 0) {
27
+ throw new Error(errors[0]);
28
+ }
29
+ return output;
30
+ };
31
+ }
32
+ export default _function;
@@ -0,0 +1,36 @@
1
+ /*
2
+ Copyright 2020-2023 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import { get, type } from '@lowdefy/helpers';
16
+ import { getFromObject } from '@lowdefy/operators';
17
+ function _get({ arrayIndices, location, params }) {
18
+ if (!type.isObject(params)) {
19
+ throw new Error(`Operator Error: _get takes an object as params. Received: ${JSON.stringify(params)} at ${location}.`);
20
+ }
21
+ if (params.from === null) return get(params, 'default', {
22
+ default: null,
23
+ copy: true
24
+ });
25
+ if (!type.isObject(params.from) && !type.isArray(params.from)) {
26
+ throw new Error(`Operator Error: _get.from is not an object or array. Received: ${JSON.stringify(params)} at ${location}.`);
27
+ }
28
+ return getFromObject({
29
+ arrayIndices,
30
+ location,
31
+ object: params.from,
32
+ operator: '_get',
33
+ params
34
+ });
35
+ }
36
+ export default _get;
@@ -0,0 +1,25 @@
1
+ /*
2
+ Copyright 2020-2023 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import { type } from '@lowdefy/helpers';
16
+ function _gt({ params, location }) {
17
+ if (!type.isArray(params)) {
18
+ throw new Error(`Operator Error: _gt takes an array type as input. Received: ${JSON.stringify(params)} at ${location}.`);
19
+ }
20
+ if (params.length !== 2) {
21
+ throw new Error(`Operator Error: _gt takes an array of length 2 as input. Received: ${JSON.stringify(params)} at ${location}.`);
22
+ }
23
+ return params[0] > params[1];
24
+ }
25
+ export default _gt;
@@ -0,0 +1,25 @@
1
+ /*
2
+ Copyright 2020-2023 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import { type } from '@lowdefy/helpers';
16
+ function _gte({ params, location }) {
17
+ if (!type.isArray(params)) {
18
+ throw new Error(`Operator Error: _gte takes an array type as input. Received: ${JSON.stringify(params)} at ${location}.`);
19
+ }
20
+ if (params.length !== 2) {
21
+ throw new Error(`Operator Error: _gte takes an array of length 2 as input. Received: ${JSON.stringify(params)} at ${location}.`);
22
+ }
23
+ return params[0] >= params[1];
24
+ }
25
+ export default _gte;
@@ -0,0 +1,24 @@
1
+ /*
2
+ Copyright 2020-2023 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ function _if({ location, params }) {
16
+ if (params.test === true) {
17
+ return params.then;
18
+ }
19
+ if (params.test === false) {
20
+ return params.else;
21
+ }
22
+ throw new Error(`Operator Error: _if takes a boolean type for parameter test. Received: ${JSON.stringify(params)} at ${location}.`);
23
+ }
24
+ export default _if;
@@ -0,0 +1,28 @@
1
+ /*
2
+ Copyright 2020-2023 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import { type } from '@lowdefy/helpers';
16
+ function _if_none({ params, location }) {
17
+ if (!type.isArray(params)) {
18
+ throw new Error(`Operator Error: _if_none takes an array type as input. Received: ${JSON.stringify(params)} at ${location}.`);
19
+ }
20
+ if (params.length !== 2) {
21
+ throw new Error(`Operator Error: _if_none takes an array of length 2 as input. Received: ${JSON.stringify(params)} at ${location}.`);
22
+ }
23
+ if (type.isNone(params[0])) {
24
+ return params[1];
25
+ }
26
+ return params[0];
27
+ }
28
+ export default _if_none;