Function isSupersetOf

  • Create a function that test if a collection of notes is a superset of a given set (it contains all notes and at least one more)

    Parameters

    • set: Set

      an array of notes or a chroma set string to test against

    Returns ((notes) => boolean)

    a function that given a set returns true if is a subset of the first one

      • (notes): boolean
      • Parameters

        Returns boolean

    Example

    const extendsCMajor = Pcset.isSupersetOf(["C", "E", "G"])
    extendsCMajor(["e6", "a", "c4", "g2"]) // => true
    extendsCMajor(["c6", "e4", "g3"]) // => false