diff --git a/.github/workflows/check-docker-build.yml b/.github/workflows/check-docker-build.yml new file mode 100644 index 000000000..22732c34e --- /dev/null +++ b/.github/workflows/check-docker-build.yml @@ -0,0 +1,13 @@ +name: Check Docker Build + +on: + pull_request: + +jobs: + check: + name: Check Docker Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Docker Compose Build + run: docker-compose build \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 55dced160..a31ac2b66 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,31 +1,41 @@ asgiref==3.7.2 -astroid==2.6.6 -bleach==4.1.0 -colorama==0.4.4 -dj-database-url==0.5.0 -Django==4.2.3 -django-markdownify==0.9.0 +astroid==3.0.1 +attrs==23.1.0 +bleach==6.1.0 +colorama==0.4.6 +dill==0.3.7 +dj-database-url==2.1.0 +Django==4.2.7 +django-markdownify==0.9.3 django-on-heroku==1.1.2 -gunicorn==20.1.0 -importlib-metadata==4.8.2 -isort==5.9.3 -lazy-object-proxy==1.6.0 -Markdown==3.3.6 -mccabe==0.6.1 -packaging==21.3 -protobuf==3.18.3 -psycopg2-binary==2.9.5 -Pygments==2.15.0 -pylint==2.9.6 -pyparsing==3.0.6 -pytz==2021.1 +gunicorn==21.2.0 +importlib-metadata==6.8.0 +isort==5.12.0 +jsonmerge==1.9.2 +jsonschema==4.19.2 +jsonschema-specifications==2023.7.1 +lazy-object-proxy==1.9.0 +Markdown==3.5 +mccabe==0.7.0 +packaging==23.2 +platformdirs==3.11.0 +protobuf==4.24.4 +psycopg2-binary==2.9.9 +Pygments==2.16.1 +pylint==3.0.2 +pyparsing==3.1.1 +pytz==2023.3.post1 +referencing==0.30.2 +rpds-py==0.10.6 six==1.16.0 sqlparse==0.4.4 +tinycss2==1.2.1 toml==0.10.2 -typing-extensions==4.7.1 -tzdata==2021.5 +tomli==2.0.1 +tomlkit==0.12.1 +typing_extensions==4.8.0 +tzdata==2023.3 webencodings==0.5.1 -whitenoise==5.3.0 -wrapt==1.12.1 +whitenoise==6.6.0 +wrapt==1.15.0 zipp==3.6.0 -jsonmerge==1.8.0 \ No newline at end of file diff --git a/web/tests/test_templates.py b/web/tests/test_templates.py index 0804a086e..2d8fff4f6 100644 --- a/web/tests/test_templates.py +++ b/web/tests/test_templates.py @@ -85,7 +85,7 @@ def test_concept_card(self): "comment": "I am a humble\nmulti-line comment in the\nform of a haiku" } ).strip() - self.assertEquals( + self.assertEqual( rendered_template_5, "
\n" "
\n" diff --git a/web/thesauruses/_meta/language_basics.json b/web/thesauruses/_meta/language_basics.json new file mode 100644 index 000000000..0de09acf0 --- /dev/null +++ b/web/thesauruses/_meta/language_basics.json @@ -0,0 +1,57 @@ +{ + "meta": { + "structure": "language_basics", + "structure_name": "Basics of A Programming Language" + }, + "categories": { + "Typing Systems": { + "statically_typed": "The programming language may be statically typed", + "dynamically_typed": "The programming language may be dynamically typed" + }, + "Paradigm Category": { + "procedural_language": "Language extensively uses procedures to explicitly detail how tasks are performed", + "functional_language": "Language extensively uses functions, emphasize immutability", + "object_oriented_language": "Language extensively uses the concept of objects, which encapsulate data and behaviour" + }, + "Level of Abstraction": { + "low_level_language": "Language provides minimal abstraction from the hardware architecture of the computer", + "high_level_language": "Language provides a more abstract and user-friendly interface for software development" + }, + "Execution Method": { + "compiled_language": "Language is translated into machine code or an intermediate form by a compiler before execution", + "interpreted_language": "Language is executed line by line by an interpreter at runtime withot a separate compilation step" + }, + "Application Domain": { + "general_purpose_language": "Language is designed to be versatile and applicable to a wide range of tasks and applications", + "domain_specific_language": "Language is designed to address specific application domains or industries" + }, + "Memory Management": { + "manual_management": "Languages where memory has to be managed by the programmer manually", + "automatic_management": "Languages with an extensive support of automatic memory management" + }, + "Generation": { + "first_generation": "Language consists of binary code directly understood and executed by a computer's central processing unit (CPU) and represent the lowest level of programming abstraction", + "second_generation": "Language uses mnemonic codes and symbols to represent machine-level instructions, providing a more human-readable way to program and interact with a computer's hardware.", + "third_generation": "High-level programming languages designed for general-purpose software development, offering a higher level of abstraction and greater ease of use compared to low-level languages like assembly.", + "fourth_generation": "High-level programming languages designed for specific applications or domains, often using natural language-like syntax and focusing on rapid application development." + }, + "Entry Point": { + "main_function": "Entry point of the program is the main function of the file", + "custom_function": "In some programming languages, custom functions can be made to be the entry point of a program", + "script_file": "Entry point of the program is the top of the script file" + }, + "Comments": { + "single_line": "Single line comments are used for brief explanations. Most common indicators of single line comments are // and #", + "multi_line": "Multi line comments span multiple lines. Used for longer explanations, or for commenting out code which you do not intend to execute. Usually multi line comments are enclosed within /* ... */, ''' ... ''' or \"\"\" ... \"\"\" ", + "documentation": "Some programming languages have specific comment syntax for generating documentation. For example, Javadoc comments can be generated using /** ", + "special": "Some programming languages have a special comment syntax for specific purposes" + }, + "Library and Framework support": { + "standard_libraries": "Programming Language is supported by an extensive network of standard libraries which are not required to be imported externally", + "extensive_frameworks": "Language has a strong network of external frameworks for supporting additional functionalities. Usually the external libraries are installed into the project using a package manager, and imported into the required file using the `import` keyword" + }, + "Minimal Program": { + "hello_world": "The most minimal program to understand all the basics is the Hello World program. Here you only need to print \"Hello World\" to the console/output of the programming language of your choice." + } + } +} \ No newline at end of file diff --git a/web/thesauruses/lua/5/data_types.json b/web/thesauruses/lua/5/data_types.json new file mode 100644 index 000000000..6dc5a20be --- /dev/null +++ b/web/thesauruses/lua/5/data_types.json @@ -0,0 +1,120 @@ +{ + "meta": { + "language": "lua", + "language_name": "Lua", + "structure": "data_types", + "language_version": "5.1" + }, + "concepts": { + "boolean": { + "name": "Boolean", + "not-implemented": true, + "comment": "The type boolean has two values, false and true and both nil and false make a condition false." + }, + "signed_integer_8_bit": { + "name": "Signed 8-bit integer", + "not-implemented": true + }, + "unsigned_integer_8_bit": { + "name": "Unsigned 8-bit integer", + "not-implemented": true + }, + "signed_integer_16_bit": { + "name": "Signed 16-bit integer", + "not-implemented": true + }, + "unsigned_integer_16_bit": { + "name": "Unsigned 16-bit integer", + "not-implemented": true + }, + "signed_integer_32_bit": { + "name": "Signed 32-bit integer", + "not-implemented": true + }, + "unsigned_integer_32_bit": { + "name": "Unsigned 32-bit integer", + "not-implemented": true + }, + "signed_integer_64_bit": { + "name": "Signed 64-bit integer", + "not-implemented": true + }, + "unsigned_integer_64_bit": { + "name": "Unsigned 64-bit integer", + "not-implemented": true + }, + "signed_integer_as_object": { + "name": "Signed object-based Integer", + "not-implemented": true, + "comment":"Lua does not have a built-in concept of distinct signed, object-based integers with the full range of operations and methods that you might find in languages like C++ or Java." + }, + "unsigned_integer_as_object": { + "name": "Unsigned object-based Integer", + "not-implemented": true + }, + "signed_float_16_bit": { + "name": "Signed 16-bit floating point", + "not-implemented": true + }, + "unsigned_float_16_bit": { + "name": "Unsigned 16-bit floating point", + "not-implemented": true + }, + "signed_float_32_bit": { + "name": "Signed 32-bit floating point", + "not-implemented": true + }, + "unsigned_float_32_bit": { + "name": "Unsigned 32-bit floating point", + "not-implemented": true + }, + "signed_float_64_bit": { + "name": "Signed 64-bit floating point", + "not-implemented": true + }, + "unsigned_float_64_bit": { + "name": "Unsigned 64-bit floating point", + "not-implemented": true + }, + "signed_float_as_object": { + "name": "Signed object-based floating point", + "not-implemented": true, + "comment":"Same as integer applies here too." + }, + "unsigned_float_as_object": { + "name": "Unsigned object-based floating point", + "not-implemented": true + }, + "character": { + "name": "Character", + "not-implemented": true + }, + "string_as_object": { + "name": "String as an object", + "not-implemented": true, + "comment":"In Lua, strings are not treated as objects in the same way that some other programming languages, like Python or JavaScript" + }, + "string_as_array": { + "name": "String as an array of characters", + "code": + [ + "local myString = 'Hello, World!'\nlocal firstChar = myString:sub(1, 1) -- Access the first character\nlocal fifthChar = myString:sub(5, 5) -- Access the fifth character\nprint(firstChar) -- Output: 'H'\nprint(fifthChar) -- Output: 'o'" + ], + "comment":"In Lua, strings are treated as arrays of characters." + }, + "complex_as_object": { + "name": "Complex Number as an object", + "not-implemented": true, + "comment":"Lua does not have built-in support for complex numbers as a distinct data type like some other languages, such as Python." + + }, + "real_number_part": { + "name": "Complex number real part", + "not-implemented": true + }, + "imaginary_number_part": { + "name": "Complex number imaginary part", + "not-implemented": true + } + } +} diff --git a/web/thesauruses/lua/5/functions.json b/web/thesauruses/lua/5/functions.json new file mode 100644 index 000000000..7bbabf3c5 --- /dev/null +++ b/web/thesauruses/lua/5/functions.json @@ -0,0 +1,106 @@ +{ + "meta": { + "language": "lua", + "language_name": "Lua", + "structure": "functions", + "language_version": "5.1" + }, + "concepts": { + "void_function_no_parameters": { + "name": "Function that does not return a value and takes no parameters", + "code": [ + "function greet()\nend" + ] + }, + "void_function_with_parameters": { + "name": "Function that does not return a value and that takes 1 or more defined parameters", + "code": [ + "function addNumbers(a, b)\nend" + ] + }, + "void_function_with_keyword_parameters": { + "name": "Function that does not return a value and that takes 0 or more defined keyword parameters", + "not-implemented": "true" + }, + "void_function_variable_parameters": { + "name": "Function that does not return a value and function that takes an unknown number of parameters", + "code": [ + "function myFunction(...)\nend" + ] + }, + "return_value_function_no_parameters": { + "name": "Function that returns a value and takes no parameters", + "code": [ + "function generateRandomNumber()\nreturn true\nend" + ] + }, + "return_value_function_with_parameters": { + "name": "Function that returns a value and takes 1 or more defined parameters", + "code": [ + "function addNumbers(a, b)\nreturn a,b\nend" + ] + }, + "return_value_function_with_keyword_parameters": { + "name": "Function that returns a value and takes 0 or more defined keyword parameters", + "not-implemented": "true" + }, + "return_value_function_variable_parameters": { + "name": "Function that returns a value and takes an unknown number of parameters", + "code": [ + "function sum(...)\nreturn...\nend" + ] + }, + "anonymous_function_no_parameters": { + "name": "Anonymous function that takes no parameters", + "code": [ + "local myFunction = function()\nend" + ] + }, + "anonymous_function_with_parameters": { + "name": "Anonymous function that takes 1 or more defined parameters", + "code": [ + "local add = function(a, b)\nend" + ] + }, + "anonymous_function_with_keyword_parameters": { + "name": "Anonymous function that takes 0 or more defined keyword parameters", + "not-implemented": "true" + }, + "anonymous_function_variable_parameters": { + "name": "Anonymous function that takes an unknown number of parameters", + "code": [ + "local add = function(...)\nend" + ] + }, + "anonymous_function_no_parameters_with_return": { + "name": "Anonymous function that takes no parameters and returns a value", + "code": [ + "local myFunction = function()\nreturn true\nend" + ] + }, + "anonymous_function_with_parameters_with_return": { + "name": "Anonymous function that takes 1 or more defined parameters and returns a value", + "code": [ + "local add = function(a, b)\nreturn a,b\nend" + ] + }, + "anonymous_function_with_keyword_parameters_with_return": { + "name": "Anonymous function that takes 0 or more defined keyword parameters and returns a value", + "not-implemented": "true" + }, + "anonymous_function_variable_parameters_with_return": { + "name": "Anonymous function that takes an unknown number of parameters and returns a value", + "code": [ + "local myFunction = function(...)\nreturn...\nend" + ] + }, + "call_subroutine": { + "name": "Call subroutine", + "not-implemented": "true" + }, + "return_from_subroutine": { + "name": "Return from subroutine", + "not-implemented": "true" + } + } +} diff --git a/web/thesauruses/lua/5/operators.json b/web/thesauruses/lua/5/operators.json new file mode 100644 index 000000000..eff61799e --- /dev/null +++ b/web/thesauruses/lua/5/operators.json @@ -0,0 +1,244 @@ +{ + "meta": { + "language": "lua", + "language_name": "Lua", + "structure": "operators", + "language_version": "5.1" + }, + "concepts": { + "addition": { + "name": "Addition operator", + "code": [ + "a + b" + ] + }, + "addition_assignment": { + "name": "Addition and assignment operator", + "not-implemented": true + }, + "subtraction": { + "name": "Subtraction operator", + "code": [ + "a - b" + ] + }, + "subtraction_assignment": { + "name": "Subtraction and assignment operator", + "not-implemented": true + }, + "multiplication": { + "name": "Multiplication operator", + "code": [ + "a * b" + ] + }, + "multiplication_assignment": { + "name": "Multiplication and assignment operator", + "not-implemented": true + }, + "division": { + "name": "Division operator", + "code": [ + "a / b" + ] + }, + "division_assignment": { + "name": "Division and assignment operator", + "not-implemented": true + }, + "integer_division": { + "name": "Integer division operator", + "not-implemented": true + }, + "integer_division_assignment": { + "name": "Integer division and assignment operator", + "not-implemented": true + }, + "modulus": { + "name": "Modulus (remainder) operator", + "code": [ + "a % b" + ] + }, + "modulus_assignment": { + "name": "Modulus and assignment operator", + "not-implemented": true + }, + "unary_plus": { + "name": "Unary plus operator", + "not-implemented": true + }, + "unary_minus": { + "name": "Unary minus operator", + "not-implemented": true + }, + "increment": { + "name": "Increment (add 1) operator", + "not-implemented": true + }, + "decrement": { + "name": "Decrement (subtract 1) operator", + "not-implemented": true + }, + "exponential": { + "name": "Exponential operator", + "code": [ + "a ^ b" + ] + }, + "factorial": { + "name": "Factorial operator", + "not-implemented": true + }, + "absolute_value": { + "name": "Absolute value operator", + "code": [ + "math.abs(a)" + ] + }, + "percentage": { + "name": "Percentage operator", + "not-implemented": true + }, + "equal_to": { + "name": "Equality operator", + "code": [ + "a == b" + ] + }, + "not_equal_to": { + "name": "Not equal to operator", + "code": [ + "a ~= b" + ] + }, + "less_than": { + "name": "Less than operator", + "code": [ + "a < b" + ] + }, + "less_than_or_equal_to": { + "name": "Less than or equal to operator", + "code": [ + "a <= b" + ] + }, + "greater_than": { + "name": "Greater than operator", + "code": [ + "a > b" + ] + }, + "greater_than_or_equal_to": { + "name": "Greater than or equal to operator", + "code": [ + "a >= b" + ] + }, + "null_coalescing": { + "name": "Null coalescing operator", + "not-implemented": true + }, + "is": { + "name": "Is operator", + "not-implemented": true + }, + "is_not": { + "name": "Is not operator", + "not-implemented": true + }, + "logical_and": { + "name": "Logical AND operator", + "code": [ + "a and b" + ] + }, + "logical_or": { + "name": "Logical OR operator", + "code": [ + "a or b" + ] + }, + "logical_not": { + "name": "Logical NOT operator", + "code": [ + "not [condition]" + ] + }, + "bitwise_and": { + "name": "Bitwise AND operator", + "code": [ + "a & b" + ] + }, + "bitwise_and_assignment": { + "name": "Bitwise AND and assignment operator", + "not-implemented": true + }, + "bitwise_or": { + "name": "Bitwise OR operator", + "code": [ + "a | b" + ] + }, + "bitwise_or_assignment": { + "name": "Bitwise OR and assignment operator", + "not-implemented": true + }, + "bitwise_not": { + "name": "Bitwise NOT operator", + "code": [ + "~a" + ] + }, + "not_assignment": { + "name": "Bitwise NOT and assignment operator", + "not-implemented": true + }, + "bitwise_xor": { + "name": "Bitwise XOR operator", + "not-implemented": true + }, + "bitwise_xor_assignment": { + "name": "Bitwise XOR and assignment operator", + "not-implemented": true + }, + "bitwise_xnor": { + "name": "Bitwise XNOR operator", + "not-implemented": true + }, + "bitwise_xnor_assignment": { + "name": "Bitwise XNOR and assignment operator", + "not-implemented": true + }, + "left_shift": { + "name": "Left shift bitwise operator", + "code": [ + "a << b" + ] + }, + "left_shift_assignment": { + "name": "Left shift assignment operator", + "not-implemented": true + }, + "right_shift": { + "name": "Right shift bitwise operator", + "code": [ + "a >> b" + ] + }, + "right_shift_assignment": { + "name": "Right shift assignment operator", + "not-implemented": true + }, + "ternary": { + "name": "Ternary operator", + "not-implemented": true + }, + "null_forgiving": { + "name": "Null forgiving operator", + "not-implemented": true + } + } +} \ No newline at end of file diff --git a/web/thesauruses/meta_info.json b/web/thesauruses/meta_info.json index d04d4cd99..fc7bc6cae 100644 --- a/web/thesauruses/meta_info.json +++ b/web/thesauruses/meta_info.json @@ -15,6 +15,7 @@ "objectivec": "Objective-C", "perl": "Perl", "php": "PHP", + "powershell": "PowerShell", "python": "Python", "r":"R", "ruby": "Ruby", @@ -31,6 +32,7 @@ "exception_handling": "Exception Handling", "functions": "Functions, Methods, and Subroutines", "io": "Input and Output", + "language_basics": "Basics of A Programming Language", "lists": "Lists, Arrays, and Hashed Lists", "operators": "Logical and Mathematical/Arithmetic Operators", "queues_stacks": "Queues and Stacks", diff --git a/web/thesauruses/powershell/7/classes.json b/web/thesauruses/powershell/7/classes.json new file mode 100644 index 000000000..5ee3121ae --- /dev/null +++ b/web/thesauruses/powershell/7/classes.json @@ -0,0 +1,157 @@ +{ + "meta": { + "language": "powershell", + "language_name": "Powershell", + "structure": "classes", + "language_version": "7" + }, + "concepts": { + "normal_class": { + "name": "Normal class", + "code": [ + "class ClassName {", + " # class body", + "}" + ] + }, + "abstract_class": { + "name": "Abstract class", + "not-implemented": true + }, + "interface": { + "name": "Interface", + "not-implemented": true + }, + "read_only_class": { + "name": "Read-only class", + "not-implemented": true + }, + "static_class": { + "name": "Static class", + "not-implemented": true + }, + "inner_class": { + "name": "Inner class", + "not-implemented": true + }, + "packages": { + "name": "Packages", + "code": [ + "using namespace Your.Package" + ] + }, + "class_with_generic_type": { + "name": "Class with a generic type", + "not-implemented": true + }, + "private_variables": { + "name": "Defining private variables", + "code": [ + "class ClassName {", + " hidden [string] $privateVariable = \"private\";", + "}" + ], + "comment": "It's not possible to define private variables in Powershell. The closest approximation is to define a hidden variable." + }, + "protected_variables": { + "name": "Defining protected variables", + "not-implemented": true + }, + "public_variables": { + "name": "Defining public variables", + "code": [ + "class ClassName {", + " [string] $publicVariable = \"public\";", + "}" + ] + }, + "static_variables": { + "name": "Defining static variables", + "code": [ + "class ClassName {", + " static [string] $staticVariable = \"static\";", + "}" + ] + }, + "private_functions": { + "name": "Defining private functions", + "code": [ + "class ClassName {", + " hidden [string] privateFunction() {", + " return \"private\";", + " }", + "}" + ], + "comment": "It's not possible to define private functions in Powershell. The closest approximation is to define a hidden function." + }, + "protected_functions": { + "name": "Defining protected functions", + "not-implemented": true + }, + "public_functions": { + "name": "Defining public functions", + "code": [ + "class ClassName {", + " [string] publicFunction() {", + " return \"public\";", + " }", + "}" + ] + }, + "static_functions": { + "name": "Defining static functions", + "code": [ + "class ClassName {", + " static [string] staticFunction() {", + " return \"static\";", + " }", + "}" + ] + }, + "extends_class": { + "name": "Class that inherits/extends another class", + "code": [ + "class ClassName : BaseClass {", + " # class body", + "}" + ] + }, + "extending_interface": { + "name": "Class/Interface that inherits/extends another class/interface", + "not-implemented": true + }, + "calling_superclass_functions": { + "name": "Calling a superclass function", + "not-implemented": true + }, + "overriding_superclass_functions": { + "name": "Overriding a superclass function", + "not-implemented": true + }, + "instantiating_object": { + "name": "Instantiating a new object", + "code": [ + "$object = [ClassName]::new()", + "$object = New-Object ClassName" + ] + }, + "instantiating_polymorphic_object": { + "name": "Instantiating a polymorphic object", + "not-implemented": true + }, + "implement_constructor": { + "name": "Implementing a class constructor", + "code": [ + "class ClassName {", + " ClassName() {", + " # constructor body", + " }", + "}" + ] + }, + "implement_deconstructor": { + "name": "Implementing a class deconstructor", + "not-implemented": true + } + } +} diff --git a/web/thesauruses/powershell/7/control_structures.json b/web/thesauruses/powershell/7/control_structures.json new file mode 100644 index 000000000..29c193ba4 --- /dev/null +++ b/web/thesauruses/powershell/7/control_structures.json @@ -0,0 +1,128 @@ +{ + "meta": { + "language": "powershell", + "language_name": "Powershell", + "structure": "control_structures", + "language_version": "7" + }, + "concepts": { + "if_conditional": { + "name": "If conditional", + "code": [ + "if (condition) {}" + ] + }, + "if_else_conditional": { + "name": "If/Else conditional", + "code": [ + "if (condition) {}", + "else {}" + ] + }, + "if_elseif_conditional": { + "name": "If/ElseIf conditional", + "code": [ + "if (condition) {}", + "elseif (condition) {}" + ] + }, + "if_elseif_else_conditional": { + "name": "If/ElseIf/Else conditional", + "code": [ + "if (condition) {}", + "elseif (condition) {}", + "else {}" + ] + }, + "switch_statement": { + "name": "Switch statement", + "code": [ + "switch (condition) {", + " case 1 {}", + " case 2 {}", + " default {}", + "}" + ] + }, + "ternary_conditional": { + "name": "Ternary conditional", + "code": [ + "condition ? true : false" + ] + }, + "while_loop": { + "name": "While loop", + "code": [ + "while (condition) {", + " ...", + "}" + ] + }, + "do_while_loop": { + "name": "Do/While loop", + "code": [ + "do {", + " ...", + "} while (condition)" + ] + }, + "until_loop": { + "name": "Until loop", + "code": [ + "until (condition) {", + " ...", + "}" + ] + }, + "do_until_loop": { + "name": "Do/Until loop", + "code": [ + "do {", + " ...", + "} until (condition)" + ] + }, + "for_loop": { + "name": "For loop", + "code": [ + "for ($i = 0; $i < 10; $i++) {}" + ] + }, + "foreach_loop": { + "name": "Foreach loop", + "code": [ + "foreach ($item in $items) {}" + ] + }, + "list_comprehension": { + "name": "List Comprehension", + "not-implemented": true + }, + "each_iteration": { + "name": "Each iteration", + "not-implemented": true + }, + "map_iteration": { + "name": "Map iteration", + "not-implemented": true + }, + "filter_iteration": { + "name": "Filter iteration", + "code": [ + "$items | ? { condition }", + "$items | where { condition }", + "$items | where-object { condition }" + ], + "comment": "The ? operator and the where keyword are aliases for the where-object cmdlet." + }, + "fold_iteration": { + "name": "Fold iteration", + "code": [ + "$items | % {}", + "$items | foreach {}", + "$items | foreach-object {}" + ], + "comment": "The % operator and the foreach keyword are aliases for the foreach-object cmdlet." + } + } +}