Skip to content
This repository was archived by the owner on Feb 1, 2025. It is now read-only.
This repository was archived by the owner on Feb 1, 2025. It is now read-only.

yield*, strings #157

@sebmck

Description

@sebmck

Currently it's not possible to yield non-objects such as primitives etc due to the use of in in the runtime. May be necessary to just use Object.prototype.hasOwnProperty.

For example the following taken from compat-table wont work:

var iterator = (function* generator() {
  yield* "56";
}());
var item = iterator.next();
var passed = item.value === "5" && item.done === false;
item = iterator.next();
passed    &= item.value === "6" && item.done === false;
item = iterator.next();
passed    &= item.value === undefined && item.done === true;
return passed;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions