You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-6
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# array_
2
2
## Conversion of JavaScript's Array methods to AutoHotkey
3
3
4
-
Despite AutoHotKey (1.1.28 at the moment) supporting Arrays and Function Objects, there are no handy built-in methods for parsing Array data. This project ports most of JavaScript's Array object methods over to AutoHotKey.
4
+
AutoHotKey is an extremely versatile prototype-based language but lacks built-in iteration helper methods (as of 1.1.28) to perform many of the common behaviors found in other languages. This project ports most of JavaScript's Array object methods over to AutoHotKey.
5
5
6
6
### Ported Methods
7
7
* concat
@@ -30,7 +30,7 @@ Despite AutoHotKey (1.1.28 at the moment) supporting Arrays and Function Objects
30
30
### Installation
31
31
There are two options for using these functions, either as global functions stored in **array_.ahk** or by extending the built-in Array object with the object stored in **array_base.ahk**. The sorting function in both files depend on the object defined in **array_quicksort.ahk**. This object must be present for sorting to work properly.
32
32
33
-
Some dislike extending built-in objects. For that reason **array_base.ahk**'s object does not automatically extend Array. Extending Array, or a custom collections object, is left to the implementer (See _**As Array Object Extension**_ below).
33
+
Some dislike extending built-in objects. For that reason **array_base.ahk**'s object does not automatically extend Array. Extending Array, or a custom collections object, is left to the implementer (See _**As Array Object Extension**_ below). Using this method based approach grants the ability to perform method-chaining syntax.
**array_base.ahk** contains each ported function as a method of the object *_Array*. The most intuitive use case is extending the built-in Array object (assigning it's base object). Some environments avoid modifying built-ins and prefer using custom collection objects.
62
+
**array_base.ahk** contains each ported function as a method of the object *_Array*. The most intuitive use case is extending the built-in Array object (assigning it's base object). Some environments avoid modifying built-ins and prefer using custom collection objects. This allows the familar method chaining many have become accustomed to in other languages.
61
63
62
64
Usage: `Array.<fn>([params*])` (Assuming Array's base object was extended)
0 commit comments