-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added range function and bumped to v1.0.4
- Loading branch information
Showing
6 changed files
with
58 additions
and
3 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -163,3 +163,5 @@ dist | |
# End of https://www.toptal.com/developers/gitignore/api/node,visualstudiocode | ||
|
||
.idea | ||
|
||
.DS_Store |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[Back to reference](../README.md) | ||
|
||
### `range(stop)` or `range(start, stop, step=1)` | ||
|
||
Implementation of the Python range function. Returns an array with numbers starting at `start` and going to the last possible value lower than `stop`. | ||
|
||
if `start` is not supplied, it begins with `0`. | ||
|
||
if `step` is not supplied, it defaults to `1`. `step` might also be negative, but then `start` must be higher than `stop`. | ||
|
||
#### Examples: | ||
|
||
```javascript | ||
let myRange = gmynd.range(10); | ||
// myRange will be [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | ||
``` | ||
|
||
```javascript | ||
let myRange = gmynd.range(5, 2, -0.5); | ||
// myRange will be [5, 4.5, 4, 3.5, 3, 2.5] | ||
``` |
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