Beispiel #1
0
        public static IEnumerable <JSValue> AsEnumerable(this IIterable iterableObject)
        {
            var iterator = iterableObject.iterator();

            if (iterator == null)
            {
                yield break;
            }

            var item = iterator.next();

            while (!item.done)
            {
                yield return(item.value);

                item = iterator.next();
            }
        }