Skip to content

Support merge generators #29

@SettingDust

Description

@SettingDust

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the feature has not already been requested

🚀 Feature Proposal

Support merge generators

Motivation

No response

Example

const values1 = function * () {
  yield * [0, 1, 2, 3, 4]
}
const values2 = function * () {
  yield * [5, 6, 7, 8, 9]
}

deepmerge(values1, value2) // generator like 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 <- ordered
const values1 = async function * () {
  yield * [0, 1, 2, 3, 4]
}
const values2 = async function * () {
  yield * [5, 6, 7, 8, 9]
}

deepmerge(values1, value2) // async generator like 0, 1, 5, 2, 6, 7, 3, 4, 8, 9 <- no order

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions