All Downloads are FREE. Search and download functionalities are using the official Maven repository.

node_modules.apollo-codegen-core.src.utilities.array.ts Maven / Gradle / Ivy

There is a newer version: 3.3.1
Show newest version
declare global {
  interface Array {
    flatMap(callbackfn: (value: T, index: number, array: T[]) => U[] | undefined, thisArg?: any): U[];
  }
}

export function maybePush(list: T[], item: T) {
  if (!list.includes(item)) {
    list.push(item);
  }
  return list;
};




© 2015 - 2025 Weber Informatics LLC | Privacy Policy