UNPKG
tinkerhub
Version:
latest (2.7.0)
2.7.0
2.6.0
2.5.0
2.4.2
2.4.1
2.4.0
2.3.0
2.2.0
2.1.0
2.0.3
2.0.2
2.0.1
2.0.0
1.0.0
0.2.0
0.1.1
0.1.0
0.0.3
0.0.2
0.0.1
Connect your things together and tinker with them
github.com/tinkerhub/tinkerhub
tinkerhub/tinkerhub
tinkerhub
/
lib
/
utils
/
extended-iterable.js
18 lines
(15 loc)
•
232 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
'use strict'
;
module
.
exports
=
class
ExtendedIterable
{
forEach
(
func
) {
for
(
const
obj
of
this
) {
func
(obj); } }
toArray
(
) {
const
result = [];
for
(
const
obj
of
this
) { result.
push
(obj); }
return
result; } };