
export function parseId(potentialId) {
  return (Number.isNaN(potentialId) || potentialId === null) ? null : parseInt(potentialId, 10);
}

export const TEMP = 'temp';


export function parseId(potentialId) {
  const parsed = (Number.isNaN(potentialId) || potentialId === null) ? null : parseInt(potentialId, 10);
  if (Number.isNaN(parsed)) {
    return null;
  }
  return parsed;
}

export const TEMP = 'temp';

Return null, not NaN if id being parsed is not a number
Return null, not NaN if id being parsed is not a number
