-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR is implementing the another "result" function for the
$
(`s…
…elector`) function . The new "result" function `toArray()` returns an `array of strings` which is an usual array with has all selected `id's` and you can apply all appropriate arrays methods to it. The reason of this PR - in some cases, you need to get the array of strings from the `selector`, instead of use the current `each` iterator. Moreover, the source data already presented as an array of strings, so you don't need to iterate it once more time. Changed files: - `lib/javascript.d.ts`: updated declaration of `$` - the `toArray() is added; - `lib/sandbox.js`: implementation of the `toArray()` function; - `test/testFunctions.js`: test added for the `toArray()` function; - `docs/en/javascript.md`: documentation updates of the `$` function description.
- Loading branch information
1 parent
af09773
commit 973646e
Showing
4 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters