bare-script 3.0.14__tar.gz → 3.0.16__tar.gz
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.
- {bare_script-3.0.14/src/bare_script.egg-info → bare_script-3.0.16}/PKG-INFO +1 -1
- {bare_script-3.0.14 → bare_script-3.0.16}/setup.cfg +1 -1
- {bare_script-3.0.14 → bare_script-3.0.16}/src/bare_script/library.py +20 -0
- {bare_script-3.0.14 → bare_script-3.0.16}/src/bare_script/value.py +6 -6
- {bare_script-3.0.14 → bare_script-3.0.16/src/bare_script.egg-info}/PKG-INFO +1 -1
- {bare_script-3.0.14 → bare_script-3.0.16}/LICENSE +0 -0
- {bare_script-3.0.14 → bare_script-3.0.16}/README.md +0 -0
- {bare_script-3.0.14 → bare_script-3.0.16}/pyproject.toml +0 -0
- {bare_script-3.0.14 → bare_script-3.0.16}/src/bare_script/__init__.py +0 -0
- {bare_script-3.0.14 → bare_script-3.0.16}/src/bare_script/__main__.py +0 -0
- {bare_script-3.0.14 → bare_script-3.0.16}/src/bare_script/bare.py +0 -0
- {bare_script-3.0.14 → bare_script-3.0.16}/src/bare_script/baredoc.py +0 -0
- {bare_script-3.0.14 → bare_script-3.0.16}/src/bare_script/data.py +0 -0
- {bare_script-3.0.14 → bare_script-3.0.16}/src/bare_script/model.py +0 -0
- {bare_script-3.0.14 → bare_script-3.0.16}/src/bare_script/options.py +0 -0
- {bare_script-3.0.14 → bare_script-3.0.16}/src/bare_script/parser.py +0 -0
- {bare_script-3.0.14 → bare_script-3.0.16}/src/bare_script/runtime.py +0 -0
- {bare_script-3.0.14 → bare_script-3.0.16}/src/bare_script.egg-info/SOURCES.txt +0 -0
- {bare_script-3.0.14 → bare_script-3.0.16}/src/bare_script.egg-info/dependency_links.txt +0 -0
- {bare_script-3.0.14 → bare_script-3.0.16}/src/bare_script.egg-info/entry_points.txt +0 -0
- {bare_script-3.0.14 → bare_script-3.0.16}/src/bare_script.egg-info/requires.txt +0 -0
- {bare_script-3.0.14 → bare_script-3.0.16}/src/bare_script.egg-info/top_level.txt +0 -0
|
@@ -46,6 +46,25 @@ _ARRAY_COPY_ARGS = value_args_model([
|
|
|
46
46
|
])
|
|
47
47
|
|
|
48
48
|
|
|
49
|
+
# $function: arrayDelete
|
|
50
|
+
# $group: Array
|
|
51
|
+
# $doc: Delete an array element
|
|
52
|
+
# $arg array: The array
|
|
53
|
+
# $arg index: The array element's index
|
|
54
|
+
# $return: The array element
|
|
55
|
+
def _array_delete(args, unused_options):
|
|
56
|
+
array, index = value_args_validate(_ARRAY_DELETE_ARGS, args)
|
|
57
|
+
if index >= len(array):
|
|
58
|
+
raise ValueArgsError('index', index)
|
|
59
|
+
|
|
60
|
+
del array[int(index)]
|
|
61
|
+
|
|
62
|
+
_ARRAY_DELETE_ARGS = value_args_model([
|
|
63
|
+
{'name': 'array', 'type': 'array'},
|
|
64
|
+
{'name': 'index', 'type': 'number', 'integer': True, 'gte': 0}
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
|
|
49
68
|
# $function: arrayExtend
|
|
50
69
|
# $group: Array
|
|
51
70
|
# $doc: Extend one array with another
|
|
@@ -1988,6 +2007,7 @@ _URL_ENCODE_COMPONENT_ARGS = value_args_model([
|
|
|
1988
2007
|
# The built-in script functions
|
|
1989
2008
|
SCRIPT_FUNCTIONS = {
|
|
1990
2009
|
'arrayCopy': _array_copy,
|
|
2010
|
+
'arrayDelete': _array_delete,
|
|
1991
2011
|
'arrayExtend': _array_extend,
|
|
1992
2012
|
'arrayGet': _array_get,
|
|
1993
2013
|
'arrayIndexOf': _array_index_of,
|
|
@@ -376,25 +376,25 @@ struct FunctionArgument
|
|
|
376
376
|
optional bool nullable
|
|
377
377
|
|
|
378
378
|
# The default argument value
|
|
379
|
-
optional
|
|
379
|
+
optional any default
|
|
380
380
|
|
|
381
381
|
# If true, this argument is the array of remaining arguments
|
|
382
|
-
optional
|
|
382
|
+
optional bool lastArgArray
|
|
383
383
|
|
|
384
384
|
# If true, the number argument must be an integer
|
|
385
385
|
optional bool integer
|
|
386
386
|
|
|
387
387
|
# The number argument must be less-than
|
|
388
|
-
optional
|
|
388
|
+
optional any lt
|
|
389
389
|
|
|
390
390
|
# The number argument must be less-than-or-equal-to
|
|
391
|
-
optional
|
|
391
|
+
optional any lte
|
|
392
392
|
|
|
393
393
|
# The number argument must be greater-than
|
|
394
|
-
optional
|
|
394
|
+
optional any gt
|
|
395
395
|
|
|
396
396
|
# The number argument must be greater-than-or-equal-to
|
|
397
|
-
optional
|
|
397
|
+
optional any gte
|
|
398
398
|
|
|
399
399
|
|
|
400
400
|
# The function argument types
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|