Skip to content

Instantly share code, notes, and snippets.

@sinsunsan
Last active August 28, 2019 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sinsunsan/a87fc6fc9d9dbd3534981247b5eaf2df to your computer and use it in GitHub Desktop.
Save sinsunsan/a87fc6fc9d9dbd3534981247b5eaf2df to your computer and use it in GitHub Desktop.
tdLines.forEach((line, index) => {
switch (true) {
// you can use any condition here
case this.isLineNotReadyToUse(line):
linesNotReadyToUseCount++;
break;
case this.isPartNumberDuplicated(line, index, tdLines):
duplicatedPartsCount++;
break;
case partNumberAssociatedData &&
this.isPartInValidationProcess(
line,
partNumberAssociatedData.partNumbers,
):
partNumberAssociatedDesignNoteCount++;
break;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment